Skip to content

Commit f889441

Browse files
committed
port to work with flipper and fbt
1 parent b323627 commit f889441

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+40
-17970
lines changed

crypto/aes/aestst.c

+19-19
Original file line numberDiff line numberDiff line change
@@ -96,25 +96,25 @@ unsigned char res[3][32] =
9696
}
9797
};
9898

99-
void cycles(volatile uint64_t *rtn)
100-
{
101-
#if defined( _MSCVER )
102-
__asm // read the Pentium Time Stamp Counter
103-
{ cpuid
104-
rdtsc
105-
mov ecx,rtn
106-
mov [ecx],eax
107-
mov [ecx+4],edx
108-
cpuid
109-
}
110-
#elif defined( __GNUC__ )
111-
#if defined(__aarch64__)
112-
__asm__ __volatile__("mrs %0, cntvct_el0": "=r" (*rtn));
113-
#else
114-
__asm__ __volatile__("rdtsc": "=A" (*rtn));
115-
#endif
116-
#endif
117-
}
99+
// void cycles(volatile uint64_t *rtn)
100+
// {
101+
// #if defined( _MSCVER )
102+
// __asm // read the Pentium Time Stamp Counter
103+
// { cpuid
104+
// rdtsc
105+
// mov ecx,rtn
106+
// mov [ecx],eax
107+
// mov [ecx+4],edx
108+
// cpuid
109+
// }
110+
// #elif defined( __GNUC__ )
111+
// #if defined(__aarch64__)
112+
// __asm__ __volatile__("mrs %0, cntvct_el0": "=r" (*rtn));
113+
// #else
114+
// __asm__ __volatile__("rdtsc": "=A" (*rtn));
115+
// #endif
116+
// #endif
117+
// }
118118

119119
int main(void)
120120
{ unsigned char out[32], ret[32], err = 0;

crypto/ed25519-donna/ed25519-donna-impl-base.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <assert.h>
22
#include "ed25519-donna.h"
3-
#include "memzero.h"
3+
#include "../memzero.h"
44

55
/* sqrt(x) is such an integer y that 0 <= y <= p - 1, y % 2 = 0, and y^2 = x (mod p). */
66
/* d = -121665 / 121666 */

crypto/ed25519-donna/ed25519-donna-impl-base.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ void ge25519_nielsadd2_p1p1(ge25519_p1p1 *r, const ge25519 *p, const ge25519_nie
2424
#endif
2525

2626
/* computes [s1]p1 + [s2]p2 */
27-
#if USE_MONERO
27+
//#if USE_MONERO
2828
void ge25519_double_scalarmult_vartime2(ge25519 *r, const ge25519 *p1, const bignum256modm s1, const ge25519 *p2, const bignum256modm s2);
29-
#endif
29+
//#endif
3030

3131
void ge25519_pnielsadd_p1p1(ge25519_p1p1 *r, const ge25519 *p, const ge25519_pniels *q, unsigned char signbit);
3232

crypto/ed25519-donna/ed25519-hash-custom-keccak.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#ifndef ED25519_HASH_CUSTOM
1313
#define ED25519_HASH_CUSTOM
1414

15-
#include "sha3.h"
15+
#include "../sha3.h"
1616

1717
#define ed25519_hash_context SHA3_CTX
1818
#define ed25519_hash_init(ctx) keccak_512_Init(ctx)

crypto/ed25519-donna/ed25519-hash-custom-sha3.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#ifndef ED25519_HASH_CUSTOM
1313
#define ED25519_HASH_CUSTOM
1414

15-
#include "sha3.h"
15+
#include "../sha3.h"
1616

1717
#define ed25519_hash_context SHA3_CTX
1818
#define ed25519_hash_init(ctx) sha3_512_Init(ctx)

crypto/ed25519-donna/ed25519-hash-custom.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#ifndef ED25519_HASH_CUSTOM
1313
#define ED25519_HASH_CUSTOM
1414

15-
#include "sha2.h"
15+
#include "../sha2.h"
1616

1717
#define ed25519_hash_context SHA512_CTX
1818
#define ed25519_hash_init(ctx) sha512_Init(ctx)

crypto/ed25519-donna/ed25519.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
#include "ed25519.h"
1919

2020
#include "ed25519-hash-custom.h"
21-
#include "rand.h"
22-
#include "memzero.h"
21+
#include "../rand.h"
22+
#include "../memzero.h"
2323

2424
/*
2525
Generates a (extsk[0..31]) and aExt (extsk[32..63])

crypto/ed25519-donna/ed25519.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef ED25519_H
22
#define ED25519_H
33

4-
#include "options.h"
4+
#include "../options.h"
55

66
#if defined(__cplusplus)
77
extern "C" {

crypto/fuzzer/README.md

-105
This file was deleted.

0 commit comments

Comments
 (0)