aboutsummaryrefslogtreecommitdiff
path: root/src/ringct
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-02-21 11:16:43 +0200
committerRiccardo Spagni <ric@spagni.net>2017-02-21 11:16:43 +0200
commitd11dbe7dc24c8ab30afc2ce6b004885979ee8be6 (patch)
tree878f7b040b6fa675f6f117b0b7ca285570c4ceb1 /src/ringct
parentMerge pull request #1737 (diff)
parentcore: updates can now be downloaded (and SHA256 hash checked) (diff)
downloadmonero-d11dbe7dc24c8ab30afc2ce6b004885979ee8be6.tar.xz
Merge pull request #1744
a5a0a3c8 core: updates can now be downloaded (and SHA256 hash checked) (moneromooo-monero) 216f062e util: add a SHA256 function (moneromooo-monero) 4bf78492 mlog: only silence errors for net by default, not net.* (moneromooo-monero) d282cfcc core: test key images against validity domain (moneromooo-monero) efb72e74 http_client: add a couple consts (moneromooo-monero) f640512c Optionally query moneropulse DNS records to check for updates (moneromooo-monero) e3cae4ae core: display any fork warning at startup too (moneromooo-monero) 969ad710 dns_utils: fix first checked DNS entry being ignored (moneromooo-monero) 08c3f380 util: add a vercmp function to compare version numbers (moneromooo-monero) e8a7525c dns_utils: factor TXT record loading code from checkpoint code (moneromooo-monero)
Diffstat (limited to 'src/ringct')
-rw-r--r--src/ringct/rctOps.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ringct/rctOps.h b/src/ringct/rctOps.h
index 90f54b050..cb19bbbd6 100644
--- a/src/ringct/rctOps.h
+++ b/src/ringct/rctOps.h
@@ -66,6 +66,7 @@ namespace rct {
static const key Z = { {0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 } };
static const key I = { {0x01, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 } };
+ static const key L = { {0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10 } };
//Creates a zero scalar
inline key zero() { return Z; }
@@ -73,6 +74,9 @@ namespace rct {
//Creates a zero elliptic curve point
inline key identity() { return I; }
inline void identity(key &Id) { memcpy(&Id, &I, 32); }
+ //Creates a key equal to the curve order
+ inline key curveOrder() { return L; }
+ inline void curveOrder(key &l) { l = L; }
//copies a scalar or point
inline void copy(key &AA, const key &A) { memcpy(&AA, &A, 32); }
inline key copy(const key & A) { key AA; memcpy(&AA, &A, 32); return AA; }