mirror of
https://github.com/kazu-yamamoto/crypton.git
synced 2024-10-04 07:50:45 +03:00
Fix typos
This commit is contained in:
parent
ce35a1e07d
commit
78684bc62b
@ -44,7 +44,7 @@ compute' g = MP . foldl' (step $ g) (B.replicate bsz 0) . chunks . pad (ZERO bsz
|
||||
where
|
||||
(hd, tl) = B.splitAt bsz msg
|
||||
|
||||
-- | Compute Miyaguchi-Preneel one way compress using the infered block cipher.
|
||||
-- | Compute Miyaguchi-Preneel one way compress using the inferred block cipher.
|
||||
-- Only safe when KEY-SIZE equals to BLOCK-SIZE.
|
||||
--
|
||||
-- Simple usage /mp' msg :: MiyaguchiPreneel AES128/
|
||||
|
@ -6,7 +6,7 @@
|
||||
-- Portability : unknown
|
||||
--
|
||||
-- Various cryptographic padding commonly used for block ciphers
|
||||
-- or assymetric systems.
|
||||
-- or asymmetric systems.
|
||||
--
|
||||
module Crypto.Data.Padding
|
||||
( Format(..)
|
||||
|
@ -56,7 +56,7 @@ expSafe b e m
|
||||
-- hiding parameters.
|
||||
--
|
||||
-- Use this function when all the parameters are public,
|
||||
-- otherwise 'expSafe' should be prefered.
|
||||
-- otherwise 'expSafe' should be preferred.
|
||||
expFast :: Integer -- ^ base
|
||||
-> Integer -- ^ exponent
|
||||
-> Integer -- ^ modulo
|
||||
|
@ -127,7 +127,7 @@ primalityTestMillerRabin tries !n =
|
||||
factorise :: Integer -> Integer -> (Integer, Integer)
|
||||
factorise !si !vi
|
||||
| vi `testBit` 0 = (si, vi)
|
||||
| otherwise = factorise (si+1) (vi `shiftR` 1) -- probably faster to not shift v continously, but just once.
|
||||
| otherwise = factorise (si+1) (vi `shiftR` 1) -- probably faster to not shift v continuously, but just once.
|
||||
expmod = expSafe
|
||||
|
||||
-- when iteration reach zero, we have a probable prime
|
||||
|
@ -31,7 +31,7 @@ import Crypto.Random.Entropy.RDRand
|
||||
import Crypto.Random.Entropy.Source
|
||||
#endif
|
||||
|
||||
-- | CPU options impacting cryptography implementation and libary performance.
|
||||
-- | CPU options impacting cryptography implementation and library performance.
|
||||
data ProcessorOption
|
||||
= AESNI -- ^ Support for AES instructions, with flag @support_aesni@
|
||||
| PCLMUL -- ^ Support for CLMUL instructions, with flag @support_pclmuldq@
|
||||
|
@ -91,7 +91,7 @@ static inline int cryptonite_rdrand_step(RDRAND_T *buffer)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Returns the number of bytes succesfully generated */
|
||||
/* Returns the number of bytes successfully generated */
|
||||
int cryptonite_get_rand_bytes(uint8_t *buffer, size_t len)
|
||||
{
|
||||
RDRAND_T tmp;
|
||||
|
Loading…
Reference in New Issue
Block a user