Skip to content

Commit

Permalink
modtrezorcrypto: define mock package
Browse files Browse the repository at this point in the history
  • Loading branch information
jpochyla committed Oct 10, 2018
1 parent 7c07752 commit bce8596
Show file tree
Hide file tree
Showing 23 changed files with 47 additions and 0 deletions.
2 changes: 2 additions & 0 deletions embed/extmod/modtrezorcrypto/modtrezorcrypto-aes.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ enum AESMode {
CTR = 0x04,
};

/// package: trezorcrypto.__init__

/// class AES:
/// '''
/// AES context.
Expand Down
2 changes: 2 additions & 0 deletions embed/extmod/modtrezorcrypto/modtrezorcrypto-bip32.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include "memzero.h"
#include "nem.h"

/// package: trezorcrypto.bip32

/// class HDNode:
/// '''
/// BIP0032 HD node structure.
Expand Down
2 changes: 2 additions & 0 deletions embed/extmod/modtrezorcrypto/modtrezorcrypto-bip39.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include "bip39.h"

/// package: trezorcrypto.bip39

/// def find_word(prefix: str) -> Optional[str]:
/// '''
/// Return the first word from the wordlist starting with prefix.
Expand Down
2 changes: 2 additions & 0 deletions embed/extmod/modtrezorcrypto/modtrezorcrypto-blake256.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "blake256.h"
#include "memzero.h"

/// package: trezorcrypto.__init__

/// class Blake256:
/// '''
/// Blake256 context.
Expand Down
2 changes: 2 additions & 0 deletions embed/extmod/modtrezorcrypto/modtrezorcrypto-blake2b.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include "blake2b.h"
#include "memzero.h"

/// package: trezorcrypto.__init__

/// class Blake2b:
/// '''
/// Blake2b context.
Expand Down
2 changes: 2 additions & 0 deletions embed/extmod/modtrezorcrypto/modtrezorcrypto-blake2s.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include "blake2s.h"
#include "memzero.h"

/// package: trezorcrypto.__init__

/// class Blake2s:
/// '''
/// Blake2s context.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "chacha20poly1305/rfc7539.h"
#include "memzero.h"

/// package: trezorcrypto.__init__

/// class ChaCha20Poly1305:
/// '''
/// ChaCha20Poly1305 context.
Expand Down
2 changes: 2 additions & 0 deletions embed/extmod/modtrezorcrypto/modtrezorcrypto-curve25519.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#include "rand.h"

/// package: trezorcrypto.curve25519

/// def generate_secret() -> bytes:
/// '''
/// Generate secret key.
Expand Down
2 changes: 2 additions & 0 deletions embed/extmod/modtrezorcrypto/modtrezorcrypto-ed25519.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

#include "rand.h"

/// package: trezorcrypto.ed25519

/// def generate_secret() -> bytes:
/// '''
/// Generate secret key.
Expand Down
2 changes: 2 additions & 0 deletions embed/extmod/modtrezorcrypto/modtrezorcrypto-groestl.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#define GROESTL512_DIGEST_LENGTH 64
#define GROESTL512_BLOCK_LENGTH 128

/// package: trezorcrypto.__init__

/// class Groestl512:
/// '''
/// GROESTL512 context.
Expand Down
3 changes: 3 additions & 0 deletions embed/extmod/modtrezorcrypto/modtrezorcrypto-monero.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
#include "monero/monero.h"
#include "bignum.h"

/// package: trezorcrypto.monero



typedef struct _mp_obj_hasher_t {
mp_obj_base_t base;
Expand Down
2 changes: 2 additions & 0 deletions embed/extmod/modtrezorcrypto/modtrezorcrypto-nem.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#include "nem.h"

/// package: trezorcrypto.nem

/// def validate_address(address: str, network: int) -> bool:
/// '''
/// Validate a NEM address
Expand Down
2 changes: 2 additions & 0 deletions embed/extmod/modtrezorcrypto/modtrezorcrypto-nist256p1.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "ecdsa.h"
#include "nist256p1.h"

/// package: trezorcrypto.nist256p1

/// def generate_secret() -> bytes:
/// '''
/// Generate secret key.
Expand Down
2 changes: 2 additions & 0 deletions embed/extmod/modtrezorcrypto/modtrezorcrypto-pbkdf2.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#define PRF_HMAC_SHA256 256
#define PRF_HMAC_SHA512 512

/// package: trezorcrypto.__init__

/// class Pbkdf2:
/// '''
/// PBKDF2 context.
Expand Down
2 changes: 2 additions & 0 deletions embed/extmod/modtrezorcrypto/modtrezorcrypto-random.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#include "rand.h"

/// package: trezorcrypto.random

/// def uniform(n: int) -> int:
/// '''
/// Compute uniform random number from interval 0 ... n - 1.
Expand Down
2 changes: 2 additions & 0 deletions embed/extmod/modtrezorcrypto/modtrezorcrypto-rfc6979.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include "rfc6979.h"

/// package: trezorcrypto.__init__

/// class Rfc6979:
/// '''
/// RFC6979 context.
Expand Down
2 changes: 2 additions & 0 deletions embed/extmod/modtrezorcrypto/modtrezorcrypto-ripemd160.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "ripemd160.h"
#include "memzero.h"

/// package: trezorcrypto.__init__

/// class Ripemd160:
/// '''
/// RIPEMD160 context.
Expand Down
2 changes: 2 additions & 0 deletions embed/extmod/modtrezorcrypto/modtrezorcrypto-secp256k1.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "ecdsa.h"
#include "secp256k1.h"

/// package: trezorcrypto.secp256k1

/// def generate_secret() -> bytes:
/// '''
/// Generate secret key.
Expand Down
2 changes: 2 additions & 0 deletions embed/extmod/modtrezorcrypto/modtrezorcrypto-sha1.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "sha2.h"
#include "memzero.h"

/// package: trezorcrypto.__init__

/// class Sha1:
/// '''
/// SHA1 context.
Expand Down
2 changes: 2 additions & 0 deletions embed/extmod/modtrezorcrypto/modtrezorcrypto-sha256.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "sha2.h"
#include "memzero.h"

/// package: trezorcrypto.__init__

/// class Sha256:
/// '''
/// SHA256 context.
Expand Down
2 changes: 2 additions & 0 deletions embed/extmod/modtrezorcrypto/modtrezorcrypto-sha3-256.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "sha3.h"
#include "memzero.h"

/// package: trezorcrypto.__init__

/// class Sha3_256:
/// '''
/// SHA3_256 context.
Expand Down
2 changes: 2 additions & 0 deletions embed/extmod/modtrezorcrypto/modtrezorcrypto-sha3-512.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "sha3.h"
#include "memzero.h"

/// package: trezorcrypto.__init__

/// class Sha3_512:
/// '''
/// SHA3_512 context.
Expand Down
2 changes: 2 additions & 0 deletions embed/extmod/modtrezorcrypto/modtrezorcrypto-sha512.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "sha2.h"
#include "memzero.h"

/// package: trezorcrypto.__init__

/// class Sha512:
/// '''
/// SHA512 context.
Expand Down

0 comments on commit bce8596

Please sign in to comment.