README.md 1.7 KB
Newer Older
1
[![Build Status](https://travis-ci.com/crylib/cry.svg?branch=master)](https://travis-ci.com/crylib/cry)
Davide Galassi's avatar
Davide Galassi committed
2
[![Coverage Status](https://coveralls.io/repos/github/crylib/cry/badge.svg?branch=master)](https://coveralls.io/github/crylib/cry?branch=master)
3

Davide Galassi's avatar
Davide Galassi committed
4 5
CRY
===
davxy's avatar
davxy committed
6

Davide Galassi's avatar
Davide Galassi committed
7 8 9
CRY is a small, comprehensive and portable cryptographic library prividing
a good collection of ciphers, hash functions, chaining modes, pseudo-random
number generators and checksums.
davxy's avatar
davxy committed
10 11 12 13 14


Multiple precision integers
---------------------------

davxy's avatar
davxy committed
15
- Basic arithmentic (add,sub,mul,div,mod,abs,exp,sqr)
davxy's avatar
davxy committed
16 17 18 19 20
- Modular exponentiation
- Modular inverse (Euclidean)
- GCD and LCM
- Probabilistic prime numbers generator (Miller-Rabin)
- Random mpi generator
Davide Galassi's avatar
Davide Galassi committed
21
- Comba, Karatsuba and Toom-Cook-3 multipliers
davxy's avatar
davxy committed
22

davxy's avatar
davxy committed
23

davxy's avatar
davxy committed
24 25 26 27
Symmetric ciphers
-----------------

### Block ciphers
28 29

- AES
davxy's avatar
davxy committed
30
- DES and Triple DES
31 32 33 34 35

### Block cipher mode of operation

- ECB
- CBC
davxy's avatar
davxy committed
36
- GCM
davxy's avatar
davxy committed
37
- CTR
38

davxy's avatar
davxy committed
39 40 41 42 43

Public key algorithms
---------------------

### Ciphers
davxy's avatar
davxy committed
44 45 46

- RSA (PKCS#1 v1.5)

davxy's avatar
davxy committed
47 48
### Secret exchange

davxy's avatar
davxy committed
49 50
- Diffie-Hellman (DH)
- ECDH
davxy's avatar
davxy committed
51

52 53 54 55 56 57
### Digital signature

- RSA (PKCS#1 v1.5)
- DSA
- ECDSA

davxy's avatar
davxy committed
58

davxy's avatar
davxy committed
59 60 61 62 63 64 65
Elliptic Curve
--------------

- Basic arithmetic (add,dbl,mul)
- Load of NIST-P256 EC parameters


davxy's avatar
davxy committed
66 67 68
Pseudo random numbers generators
--------------------------------

69
- OS agnostic CSPRNG with AES-CTR
davxy's avatar
davxy committed
70 71 72
- Weak portable PRNG
- Posix CSPRNG (using '/dev/urandom')
- Windows CSPRNG (using 'CryptGenRandom')
davxy's avatar
davxy committed
73

davxy's avatar
davxy committed
74 75 76 77
Message authentication code
---------------------------

- CMAC
davxy's avatar
davxy committed
78
- HMAC
davxy's avatar
davxy committed
79

davxy's avatar
davxy committed
80

davxy's avatar
davxy committed
81 82 83 84 85 86 87 88 89 90 91
Hash
----

### Cryptographic hash

- MD5
- SHA-256

### CRC

- CRC16-CCITT
92
- CRC16-IBM
davxy's avatar
davxy committed
93
- CRC32-Ethernet
davxy's avatar
davxy committed
94

davxy's avatar
davxy committed
95 96 97 98 99
### Checksums

- LRC
- 8-bit trivial checksum

davxy's avatar
davxy committed
100

101 102 103 104 105 106 107 108
Classical ciphers
-----------------

### Substitution ciphers

- Hill cipher


109 110 111 112 113
Utilities
---------

- Base64 encoder/decoder