Skip to content

Commit

Permalink
Remove unproven shortcut from safeScalarMultiply
Browse files Browse the repository at this point in the history
  • Loading branch information
jml committed Jan 14, 2018
1 parent 40001c4 commit 416e7c2
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/Crypto/Spake2/Groups/Ed25519.hs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ safeScalarMultiply n = scalarMultiplyExtendedPoint addExtendedPoints n
scalarMultiplyExtendedPoint :: (ExtendedPoint a -> ExtendedPoint a -> ExtendedPoint a) -> Integer -> ExtendedPoint a -> ExtendedPoint a
scalarMultiplyExtendedPoint _ 0 _ = extendedZero
scalarMultiplyExtendedPoint add n x
| n >= l = scalarMultiplyExtendedPoint add (n `mod` l) x
| even n = doubleExtendedPoint (scalarMultiplyExtendedPoint add (n `div` 2) x)
| n == 1 = x
| n <= 0 = panic $ "Unexpected negative multiplier: " <> show n
Expand Down

0 comments on commit 416e7c2

Please sign in to comment.