[Ed448] Fixed incorrect base point
This commit is contained in:
parent
5eb71a90ec
commit
e2b0e9ee6b
@ -89,7 +89,7 @@ toPublic (SecretKey sec) = PublicKey <$>
|
||||
withByteArray sec $ \psec ->
|
||||
ccryptonite_ed448 result psec basePoint
|
||||
where
|
||||
basePoint = Ptr "\x05\x00\x00\x00\x00\x00\x00\x00\x00x00\x00\x00\x00\x00\x00\x00\x00x00\x00\x00\x00\x00\x00\x00\x00x00\x00\x00\x00\x00\x00\x00\x00x00\x00\x00\x00\x00\x00\x00\x00x00\x00\x00\x00\x00\x00\x00\x00x00\x00\x00\x00\x00\x00\x00"#
|
||||
basePoint = Ptr "\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
|
||||
{-# NOINLINE toPublic #-}
|
||||
|
||||
x448_bytes :: Int
|
||||
|
||||
@ -16,6 +16,8 @@ katTests :: [TestTree]
|
||||
katTests =
|
||||
[ testCase "0" (aliceMultBob @=? B.convert (Ed448.dh alicePublic bobPrivate))
|
||||
, testCase "1" (aliceMultBob @=? B.convert (Ed448.dh bobPublic alicePrivate))
|
||||
, testCase "2" (alicePublic @=? Ed448.toPublic alicePrivate)
|
||||
, testCase "3" (bobPublic @=? Ed448.toPublic bobPrivate)
|
||||
]
|
||||
|
||||
tests = testGroup "Ed448"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user