diff options
| author | Matthew Parlane <parlane@gmail.com> | 2013-01-29 01:18:53 +1300 |
|---|---|---|
| committer | Matthew Parlane <parlane@gmail.com> | 2013-01-29 01:18:53 +1300 |
| commit | bca2cac640e4aff69a97b919411855d0e4b305da (patch) | |
| tree | 8aa2f03b472d1a826a9faaf12aa53bc99bd2312b /Source/Core/Common | |
| parent | 2dd077028fdaa296827864e70252b4e992b26c65 (diff) | |
keys.bin support added.
Remove hollywood id from config.
Tidy HLE_Device_es.h (maybe)
Added const params to crypto stuff.
Diffstat (limited to 'Source/Core/Common')
| -rw-r--r-- | Source/Core/Common/Src/Crypto/ec.cpp | 8 | ||||
| -rw-r--r-- | Source/Core/Common/Src/Crypto/tools.h | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/Source/Core/Common/Src/Crypto/ec.cpp b/Source/Core/Common/Src/Crypto/ec.cpp index 08a632ff7a..e94bb4e3d2 100644 --- a/Source/Core/Common/Src/Crypto/ec.cpp +++ b/Source/Core/Common/Src/Crypto/ec.cpp @@ -40,7 +40,7 @@ static u8 ec_G[60] = printf("\n"); }*/ -static void elt_copy(u8 *d, u8 *a) +static void elt_copy(u8 *d, const u8 *a) { memcpy(d, a, 30); } @@ -303,7 +303,7 @@ static void point_add(u8 *r, u8 *p, u8 *q) elt_add(ry, s, rx); } -void point_mul(u8 *d, u8 *a, u8 *b) // a is bignum +void point_mul(u8 *d, const u8 *a, u8 *b) // a is bignum { u32 i; u8 mask; @@ -330,7 +330,7 @@ void silly_random(u8 * rndArea, u8 count) } } -void generate_ecdsa(u8 *R, u8 *S, u8 *k, u8 *hash) +void generate_ecdsa(u8 *R, u8 *S, const u8 *k, u8 *hash) { u8 e[30]; u8 kk[30]; @@ -394,7 +394,7 @@ int check_ecdsa(u8 *Q, u8 *R, u8 *S, u8 *hash) return (bn_compare(r1, R, 30) == 0); } -void ec_priv_to_pub(u8 *k, u8 *Q) +void ec_priv_to_pub(const u8 *k, u8 *Q) { point_mul(Q, k, ec_G); } diff --git a/Source/Core/Common/Src/Crypto/tools.h b/Source/Core/Common/Src/Crypto/tools.h index e3b5dcce58..ef4f8efc80 100644 --- a/Source/Core/Common/Src/Crypto/tools.h +++ b/Source/Core/Common/Src/Crypto/tools.h @@ -13,10 +13,10 @@ void bn_add(u8 *d, u8 *a, u8 *b, u8 *N, u32 n); void bn_mul(u8 *d, u8 *a, u8 *b, u8 *N, u32 n); void bn_inv(u8 *d, u8 *a, u8 *N, u32 n); // only for prime N void bn_exp(u8 *d, u8 *a, u8 *N, u32 n, u8 *e, u32 en); -void point_mul(u8 *d, u8 *a, u8 *b); +void point_mul(u8 *d, const u8 *a, u8 *b); -void generate_ecdsa(u8 *R, u8 *S, u8 *k, u8 *hash); +void generate_ecdsa(u8 *R, u8 *S, const u8 *k, u8 *hash); -void ec_priv_to_pub(u8 *k, u8 *Q); +void ec_priv_to_pub(const u8 *k, u8 *Q); #endif |
