mirror of
https://github.com/wownero/wownero.git
synced 2026-10-24 10:58:33 +02:00
crypto: add function sc_1()
This commit is contained in:
@@ -2429,6 +2429,14 @@ void sc_0(unsigned char *s) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sc_1(unsigned char *s) {
|
||||||
|
int i;
|
||||||
|
s[0] = 1;
|
||||||
|
for (i = 1; i < 32; i++) {
|
||||||
|
s[i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void sc_reduce32(unsigned char *s) {
|
void sc_reduce32(unsigned char *s) {
|
||||||
int64_t s0 = 2097151 & load_3(s);
|
int64_t s0 = 2097151 & load_3(s);
|
||||||
int64_t s1 = 2097151 & (load_4(s + 2) >> 5);
|
int64_t s1 = 2097151 & (load_4(s + 2) >> 5);
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ extern const ge_p3 ge_p3_identity;
|
|||||||
extern const ge_p3 ge_p3_H;
|
extern const ge_p3 ge_p3_H;
|
||||||
void ge_fromfe_frombytes_vartime(ge_p2 *, const unsigned char *);
|
void ge_fromfe_frombytes_vartime(ge_p2 *, const unsigned char *);
|
||||||
void sc_0(unsigned char *);
|
void sc_0(unsigned char *);
|
||||||
|
void sc_1(unsigned char *);
|
||||||
void sc_reduce32(unsigned char *);
|
void sc_reduce32(unsigned char *);
|
||||||
void sc_add(unsigned char *, const unsigned char *, const unsigned char *);
|
void sc_add(unsigned char *, const unsigned char *, const unsigned char *);
|
||||||
void sc_sub(unsigned char *, const unsigned char *, const unsigned char *);
|
void sc_sub(unsigned char *, const unsigned char *, const unsigned char *);
|
||||||
|
|||||||
Reference in New Issue
Block a user