Skip to content

Commit

Permalink
armv7m: sha256 ref
Browse files Browse the repository at this point in the history
  • Loading branch information
tfaoliveira committed Oct 12, 2023
1 parent 008061f commit afaa6d3
Show file tree
Hide file tree
Showing 5 changed files with 480 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/crypto_hash/sha256/armv7m/ref/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
override JFLAGS += -arch arm-m4
SRCS := hash.jazz
include ../../../../Makefile.common
10 changes: 10 additions & 0 deletions src/crypto_hash/sha256/armv7m/ref/hash.jazz
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
require "sha256.jinc"

export fn jade_hash_sha256_armv7m_ref(reg u32 hash input input_length) -> reg u32
{
reg u32 r;
__sha256_ref(hash, input, input_length);
r = 0;
return r;
}

18 changes: 18 additions & 0 deletions src/crypto_hash/sha256/armv7m/ref/include/api.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#ifndef JADE_HASH_sha256_armv7m_ref_API_H
#define JADE_HASH_sha256_armv7m_ref_API_H

#define JADE_HASH_sha256_armv7m_ref_BYTES 32

#define JADE_HASH_sha256_armv7m_ref_ALGNAME "SHA256"
#define JADE_HASH_sha256_armv7m_ref_ARCH "armv7m"
#define JADE_HASH_sha256_armv7m_ref_IMPL "ref"

#include <stdint.h>

int jade_hash_sha256_armv7m_ref(
uint8_t *hash,
const uint8_t *input,
uint32_t input_length
);

#endif
Loading

0 comments on commit afaa6d3

Please sign in to comment.