1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 06:18:07 +00:00

modtrezorcrypto: update trezor-crypto

This commit is contained in:
Pavol Rusnak 2017-03-28 23:09:17 +02:00
parent 7dfc863fe7
commit 41af56222a
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
4 changed files with 5 additions and 3 deletions

View File

@ -75,6 +75,7 @@ CFLAGS_MOD += \
-DAES_128 \
-DAES_192 \
-DUSE_KECCAK=1 \
-DED25519_NO_PRECOMP=1 \
-Wno-sequence-point
OBJ_MOD += \

View File

@ -73,6 +73,7 @@ CFLAGS_MOD += \
-DAES_128 \
-DAES_192 \
-DUSE_KECCAK=1 \
-DED25519_NO_PRECOMP=1 \
-Wno-sequence-point
OBJ_MOD += \

View File

@ -50,7 +50,7 @@ STATIC mp_obj_t mod_TrezorCrypto_Curve25519_publickey(mp_obj_t self, mp_obj_t se
}
vstr_t vstr;
vstr_init_len(&vstr, 32);
curve25519_donna_basepoint((uint8_t *)vstr.buf, (const uint8_t *)sk.buf);
curve25519_scalarmult_basepoint((uint8_t *)vstr.buf, (const uint8_t *)sk.buf);
return mp_obj_new_str_from_vstr(&mp_type_bytes, &vstr);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_2(mod_TrezorCrypto_Curve25519_publickey_obj, mod_TrezorCrypto_Curve25519_publickey);
@ -72,7 +72,7 @@ STATIC mp_obj_t mod_TrezorCrypto_Curve25519_multiply(mp_obj_t self, mp_obj_t sec
}
vstr_t vstr;
vstr_init_len(&vstr, 32);
curve25519_donna((uint8_t *)vstr.buf, (const uint8_t *)sk.buf, (const uint8_t *)pk.buf);
curve25519_scalarmult((uint8_t *)vstr.buf, (const uint8_t *)sk.buf, (const uint8_t *)pk.buf);
return mp_obj_new_str_from_vstr(&mp_type_bytes, &vstr);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_3(mod_TrezorCrypto_Curve25519_multiply_obj, mod_TrezorCrypto_Curve25519_multiply);

@ -1 +1 @@
Subproject commit b1bee409e72bf92283803ff53aef754040a54a2e
Subproject commit c200ce121ac268d7b201dddc89b42758ccfc40bf