You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
2.9 KiB
66 lines
2.9 KiB
![]()
9 years ago
|
/*
|
||
|
* Copyright (c) Pavol Rusnak, SatoshiLabs
|
||
|
*
|
||
![]()
8 years ago
|
* Licensed under TREZOR License
|
||
|
* see LICENSE file for details
|
||
![]()
9 years ago
|
*/
|
||
|
|
||
|
#include <stdio.h>
|
||
|
#include <string.h>
|
||
|
#include <stdint.h>
|
||
|
|
||
|
#include "py/runtime.h"
|
||
|
|
||
|
#if MICROPY_PY_TREZORCRYPTO
|
||
|
|
||
![]()
8 years ago
|
#include "modtrezorcrypto-aes.h"
|
||
![]()
8 years ago
|
#include "modtrezorcrypto-bip32.h"
|
||
![]()
8 years ago
|
#include "modtrezorcrypto-bip39.h"
|
||
![]()
8 years ago
|
#include "modtrezorcrypto-blake2b.h"
|
||
![]()
8 years ago
|
#include "modtrezorcrypto-blake2s.h"
|
||
![]()
8 years ago
|
#include "modtrezorcrypto-curve25519.h"
|
||
![]()
9 years ago
|
#include "modtrezorcrypto-ed25519.h"
|
||
![]()
8 years ago
|
#include "modtrezorcrypto-pbkdf2.h"
|
||
![]()
8 years ago
|
#include "modtrezorcrypto-random.h"
|
||
![]()
8 years ago
|
#include "modtrezorcrypto-rfc6979.h"
|
||
![]()
9 years ago
|
#include "modtrezorcrypto-ripemd160.h"
|
||
![]()
8 years ago
|
#include "modtrezorcrypto-nist256p1.h"
|
||
|
#include "modtrezorcrypto-secp256k1.h"
|
||
![]()
8 years ago
|
#include "modtrezorcrypto-sha1.h"
|
||
![]()
9 years ago
|
#include "modtrezorcrypto-sha256.h"
|
||
|
#include "modtrezorcrypto-sha512.h"
|
||
![]()
9 years ago
|
#include "modtrezorcrypto-sha3-256.h"
|
||
|
#include "modtrezorcrypto-sha3-512.h"
|
||
![]()
8 years ago
|
#include "modtrezorcrypto-ssss.h"
|
||
![]()
9 years ago
|
|
||
![]()
7 years ago
|
STATIC const mp_rom_map_elem_t mp_module_trezorcrypto_globals_table[] = {
|
||
|
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_trezorcrypto) },
|
||
|
{ MP_ROM_QSTR(MP_QSTR_AES), MP_ROM_PTR(&mod_trezorcrypto_AES_type) },
|
||
![]()
7 years ago
|
{ MP_ROM_QSTR(MP_QSTR_blake2b), MP_ROM_PTR(&mod_trezorcrypto_Blake2b_type) },
|
||
|
{ MP_ROM_QSTR(MP_QSTR_blake2s), MP_ROM_PTR(&mod_trezorcrypto_Blake2s_type) },
|
||
|
{ MP_ROM_QSTR(MP_QSTR_pbkdf2), MP_ROM_PTR(&mod_trezorcrypto_Pbkdf2_type) },
|
||
|
{ MP_ROM_QSTR(MP_QSTR_rfc6979), MP_ROM_PTR(&mod_trezorcrypto_Rfc6979_type) },
|
||
|
{ MP_ROM_QSTR(MP_QSTR_ripemd160), MP_ROM_PTR(&mod_trezorcrypto_Ripemd160_type) },
|
||
|
{ MP_ROM_QSTR(MP_QSTR_sha1), MP_ROM_PTR(&mod_trezorcrypto_Sha1_type) },
|
||
|
{ MP_ROM_QSTR(MP_QSTR_sha256), MP_ROM_PTR(&mod_trezorcrypto_Sha256_type) },
|
||
|
{ MP_ROM_QSTR(MP_QSTR_sha512), MP_ROM_PTR(&mod_trezorcrypto_Sha512_type) },
|
||
|
{ MP_ROM_QSTR(MP_QSTR_sha3_256), MP_ROM_PTR(&mod_trezorcrypto_Sha3_256_type) },
|
||
|
{ MP_ROM_QSTR(MP_QSTR_sha3_512), MP_ROM_PTR(&mod_trezorcrypto_Sha3_512_type) },
|
||
![]()
7 years ago
|
{ MP_ROM_QSTR(MP_QSTR_bip32), MP_ROM_PTR(&mod_trezorcrypto_bip32_module) },
|
||
|
{ MP_ROM_QSTR(MP_QSTR_bip39), MP_ROM_PTR(&mod_trezorcrypto_bip39_module) },
|
||
|
{ MP_ROM_QSTR(MP_QSTR_curve25519), MP_ROM_PTR(&mod_trezorcrypto_curve25519_module) },
|
||
|
{ MP_ROM_QSTR(MP_QSTR_ed25519), MP_ROM_PTR(&mod_trezorcrypto_ed25519_module) },
|
||
|
{ MP_ROM_QSTR(MP_QSTR_nist256p1), MP_ROM_PTR(&mod_trezorcrypto_nist256p1_module) },
|
||
|
{ MP_ROM_QSTR(MP_QSTR_random), MP_ROM_PTR(&mod_trezorcrypto_random_module) },
|
||
|
{ MP_ROM_QSTR(MP_QSTR_secp256k1), MP_ROM_PTR(&mod_trezorcrypto_secp256k1_module) },
|
||
|
{ MP_ROM_QSTR(MP_QSTR_ssss), MP_ROM_PTR(&mod_trezorcrypto_ssss_module) },
|
||
![]()
9 years ago
|
};
|
||
![]()
7 years ago
|
STATIC MP_DEFINE_CONST_DICT(mp_module_trezorcrypto_globals, mp_module_trezorcrypto_globals_table);
|
||
![]()
9 years ago
|
|
||
![]()
7 years ago
|
const mp_obj_module_t mp_module_trezorcrypto = {
|
||
![]()
9 years ago
|
.base = { &mp_type_module },
|
||
![]()
7 years ago
|
.globals = (mp_obj_dict_t*)&mp_module_trezorcrypto_globals,
|
||
![]()
9 years ago
|
};
|
||
|
|
||
|
#endif // MICROPY_PY_TREZORCRYPTO
|