diff options
author | Jack Lloyd <[email protected]> | 2018-04-13 10:41:36 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-04-13 11:27:28 -0400 |
commit | f0c16e78ccdec810b57dc73e4727011f5a163798 (patch) | |
tree | 236e35c03a649a1b99995cdc38ce1f99e9e4f4b3 /src/tests/data/pubkey | |
parent | 728f92bd87c22c734e00f1a8379d17e3d100ed7f (diff) |
Various minor ECC optimizations
Add a way of getting Montgomery representation of one.
Reduce use of temporaries in variable point mult.
Prefer doubling over addition in precomputing fixed window.
Add Brainpool ECDH tests
Improves ECDH by 2-3% across the board
Diffstat (limited to 'src/tests/data/pubkey')
-rw-r--r-- | src/tests/data/pubkey/ecdh.vec | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/tests/data/pubkey/ecdh.vec b/src/tests/data/pubkey/ecdh.vec index 085041b1a..336fd0acb 100644 --- a/src/tests/data/pubkey/ecdh.vec +++ b/src/tests/data/pubkey/ecdh.vec @@ -607,3 +607,35 @@ K = c026b625989f1c31e9330792ca6a9fd11896938ade31a91d38ab0457d911eeaa Secret = 0x85a268f9d7772f990c36b42b0a331adc92b5941de0b862d5d89a347cbf8faab0 CounterKey = 04AE597AD61FF4489367D4BD4132CCFD738E53C347AA463FFB5EA193713612530CBDAF81342A5ABF8B9A62CA88D52C5B6F6873678B6FEB0B991C2E16E32FDEB141 K = 19ee841c07e4874d727e4d56a664cbc0af6238ca49fd54f567c9829299b8dbff + +# From RFC 7027 + +[brainpool256r1] + +Secret = 0x81DB1EE100150FF2EA338D708271BE38300CB54241D79950F77B063039804F1D +CounterKey = 048D2D688C6CF93E1160AD04CC4429117DC2C41825E1E9FCA0ADDD34E6F1B39F7B990C57520812BE512641E47034832106BC7D3E8DD0E4C7F1136D7006547CEC6A +K = 89AFC39D41D3B327814B80940B042590F96556EC91E6AE7939BCE31F3A18BF2B + +Secret = 0x55E40BC41E37E3E2AD25C3C6654511FFA8474A91A0032087593852D3E7D76BD3 +CounterKey = 0444106E913F92BC02A1705D9953A8414DB95E1AAA49E81D9E85F929A8E3100BE58AB4846F11CACCB73CE49CBDD120F5A900A69FD32C272223F789EF10EB089BDC +K = 89AFC39D41D3B327814B80940B042590F96556EC91E6AE7939BCE31F3A18BF2B + +[brainpool384r1] + +Secret = 0x1E20F5E048A5886F1F157C74E91BDE2B98C8B52D58E5003D57053FC4B0BD65D6F15EB5D1EE1610DF870795143627D042 +CounterKey = 044D44326F269A597A5B58BBA565DA5556ED7FD9A8A9EB76C25F46DB69D19DC8CE6AD18E404B15738B2086DF37E71D1EB462D692136DE56CBE93BF5FA3188EF58BC8A3A0EC6C1E151A21038A42E9185329B5B275903D192F8D4E1F32FE9CC78C48 +K = 0BD9D3A7EA0B3D519D09D8E48D0785FB744A6B355E6304BC51C229FBBCE239BBADF6403715C35D4FB2A5444F575D4F42 + +Secret = 0x032640BC6003C59260F7250C3DB58CE647F98E1260ACCE4ACDA3DD869F74E01F8BA5E0324309DB6A9831497ABAC96670 +CounterKey = 0468B665DD91C195800650CDD363C625F4E742E8134667B767B1B476793588F885AB698C852D4A6E77A252D6380FCAF06855BC91A39C9EC01DEE36017B7D673A931236D2F1F5C83942D049E3FA20607493E0D038FF2FD30C2AB67D15C85F7FAA59 +K = 0BD9D3A7EA0B3D519D09D8E48D0785FB744A6B355E6304BC51C229FBBCE239BBADF6403715C35D4FB2A5444F575D4F42 + +[brainpool512r1] + +Secret = 0x16302FF0DBBB5A8D733DAB7141C1B45ACBC8715939677F6A56850A38BD87BD59B09E80279609FF333EB9D4C061231FB26F92EEB04982A5F1D1764CAD57665422 +CounterKey = 049D45F66DE5D67E2E6DB6E93A59CE0BB48106097FF78A081DE781CDB31FCE8CCBAAEA8DD4320C4119F1E9CD437A2EAB3731FA9668AB268D871DEDA55A5473199F2FDC313095BCDD5FB3A91636F07A959C8E86B5636A1E930E8396049CB481961D365CC11453A06C719835475B12CB52FC3C383BCE35E27EF194512B71876285FA +K = A7927098655F1F9976FA50A9D566865DC530331846381C87256BAF3226244B76D36403C024D7BBF0AA0803EAFF405D3D24F11A9B5C0BEF679FE1454B21C4CD1F + +Secret = 0x230E18E1BCC88A362FA54E4EA3902009292F7F8033624FD471B5D8ACE49D12CFABBC19963DAB8E2F1EBA00BFFB29E4D72D13F2224562F405CB80503666B25429 +CounterKey = 040A420517E406AAC0ACDCE90FCD71487718D3B953EFD7FBEC5F7F27E28C6149999397E91E029E06457DB2D3E640668B392C2A7E737A7F0BF04436D11640FD09FD72E6882E8DB28AAD36237CD25D580DB23783961C8DC52DFA2EC138AD472A0FCEF3887CF62B623B2A87DE5C588301EA3E5FC269B373B60724F5E82A6AD147FDE7 +K = A7927098655F1F9976FA50A9D566865DC530331846381C87256BAF3226244B76D36403C024D7BBF0AA0803EAFF405D3D24F11A9B5C0BEF679FE1454B21C4CD1F |