1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-02-22 20:42:03 +00:00

whitespace cleanup

This commit is contained in:
Pavol Rusnak 2017-03-28 22:52:02 +02:00
parent b1bee409e7
commit 1d232a6f86
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
7 changed files with 11 additions and 21 deletions

View File

@ -63,4 +63,3 @@ curve25519_scalarmult_donna(curve25519_key mypublic, const curve25519_key n, con
curve25519_mul(nqz, nqx, zmone);
curve25519_contract(mypublic, nqz);
}

View File

@ -1,4 +1,4 @@
const ge25519 ALIGN(16) ge25519_basepoint = {
static const ge25519 ALIGN(16) ge25519_basepoint = {
{0x0325d51a,0x018b5823,0x00f6592a,0x0104a92d,0x01a4b31d,0x01d6dc5c,0x027118fe,0x007fd814,0x013cd6e5,0x0085a4db},
{0x02666658,0x01999999,0x00cccccc,0x01333333,0x01999999,0x00666666,0x03333333,0x00cccccc,0x02666666,0x01999999},
{0x00000001,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000},
@ -9,11 +9,11 @@ const ge25519 ALIGN(16) ge25519_basepoint = {
d
*/
const bignum25519 ALIGN(16) ge25519_ecd = {
static const bignum25519 ALIGN(16) ge25519_ecd = {
0x035978a3,0x00d37284,0x03156ebd,0x006a0a0e,0x0001c029,0x0179e898,0x03a03cbb,0x01ce7198,0x02e2b6ff,0x01480db3
};
const bignum25519 ALIGN(16) ge25519_ec2d = {
static const bignum25519 ALIGN(16) ge25519_ec2d = {
0x02b2f159,0x01a6e509,0x022add7a,0x00d4141d,0x00038052,0x00f3d130,0x03407977,0x019ce331,0x01c56dff,0x00901b67
};
@ -21,11 +21,11 @@ const bignum25519 ALIGN(16) ge25519_ec2d = {
sqrt(-1)
*/
const bignum25519 ALIGN(16) ge25519_sqrtneg1 = {
static const bignum25519 ALIGN(16) ge25519_sqrtneg1 = {
0x020ea0b0,0x0186c9d2,0x008f189d,0x0035697f,0x00bd0c60,0x01fbd7a7,0x02804c9e,0x01e16569,0x0004fc1d,0x00ae0c92
};
const ge25519_niels ALIGN(16) ge25519_niels_sliding_multiples[32] = {
static const ge25519_niels ALIGN(16) ge25519_niels_sliding_multiples[32] = {
{{0x0340913e,0x000e4175,0x03d673a2,0x002e8a05,0x03f4e67c,0x008f8a09,0x00c21a34,0x004cf4b8,0x01298f81,0x0113f4be},{0x018c3b85,0x0124f1bd,0x01c325f7,0x0037dc60,0x033e4cb7,0x003d42c2,0x01a44c32,0x014ca4e1,0x03a33d4b,0x001f3e74},{0x037aaa68,0x00448161,0x0093d579,0x011e6556,0x009b67a0,0x0143598c,0x01bee5ee,0x00b50b43,0x0289f0c6,0x01bc45ed}},
{{0x00fcd265,0x0047fa29,0x034faacc,0x01ef2e0d,0x00ef4d4f,0x014bd6bd,0x00f98d10,0x014c5026,0x007555bd,0x00aae456},{0x00ee9730,0x016c2a13,0x017155e4,0x01874432,0x00096a10,0x01016732,0x01a8014f,0x011e9823,0x01b9a80f,0x01e85938},{0x01d0d889,0x01a4cfc3,0x034c4295,0x0110e1ae,0x0162508c,0x00f2db4c,0x0072a2c6,0x0098da2e,0x02f12b9b,0x0168a09a}},
{{0x0047d6ba,0x0060b0e9,0x0136eff2,0x008a5939,0x03540053,0x0064a087,0x02788e5c,0x00be7c67,0x033eb1b5,0x005529f9},{0x00a5bb33,0x00af1102,0x01a05442,0x001e3af7,0x02354123,0x00bfec44,0x01f5862d,0x00dd7ba3,0x03146e20,0x00a51733},{0x012a8285,0x00f6fc60,0x023f9797,0x003e85ee,0x009c3820,0x01bda72d,0x01b3858d,0x00d35683,0x0296b3bb,0x010eaaf9}},

View File

@ -209,7 +209,6 @@ static int ge25519_unpack_negative_vartime(ge25519 *r, const unsigned char p[32]
return 1;
}
/*
scalarmults
*/

View File

@ -8,7 +8,6 @@
Bo-Yin Yang
*/
#include "ed25519-donna-portable.h"
#include "curve25519-donna-32bit.h"
@ -30,7 +29,6 @@ ed25519_verify(const unsigned char *x, const unsigned char *y, size_t len) {
return (int) (1 & ((differentbits - 1) >> 8));
}
/*
* Arithmetic on the twisted Edwards curve -x^2 + y^2 = 1 + dx^2y^2
* with d = -(121665/121666) = 37095705934669439343138083508754565189542113879843219016388785533085940283555

View File

@ -4,7 +4,6 @@
Ed25519 reference implementation using Ed25519-donna
*/
#include "ed25519-donna.h"
#include "ed25519.h"
#include "ed25519-hash-custom.h"
@ -14,7 +13,6 @@
/*
Generates a (extsk[0..31]) and aExt (extsk[32..63])
*/
DONNA_INLINE static void
ed25519_extsk(hash_512bits extsk, const ed25519_secret_key sk) {
ed25519_hash(extsk, sk, 32);
@ -46,7 +44,6 @@ ed25519_publickey(const ed25519_secret_key sk, ed25519_public_key pk) {
ge25519_pack(pk, &A);
}
void
ed25519_sign(const unsigned char *m, size_t mlen, const ed25519_secret_key sk, const ed25519_public_key pk, ed25519_signature RS) {
ed25519_hash_context ctx;
@ -110,7 +107,6 @@ ed25519_sign_open(const unsigned char *m, size_t mlen, const ed25519_public_key
/*
Fast Curve25519 basepoint scalar multiplication
*/
void
curved25519_scalarmult_basepoint(curved25519_key pk, const curved25519_key e) {
curved25519_key ec;

View File

@ -288,8 +288,6 @@ static void contract256_modm(unsigned char out[32], const bignum256modm in) {
U32TO8_LE(out + 28, (in[7] >> 14) | (in[8] << 16));
}
static void contract256_window4_modm(signed char r[64], const bignum256modm in) {
char carry;
signed char *quads = r;