README.md 1.83 KB
Newer Older
1
[![Build Status](https://travis-ci.com/crylib/cry.svg?branch=master)](https://travis-ci.com/crylib/cry)
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

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

Davide Galassi's avatar
Davide Galassi committed
8
CRY is a small, comprehensive and portable cryptographic library prividing
Davide Galassi's avatar
Davide Galassi committed
9 10
a good collection of ciphers, hash functions, pseudo-random number generators
and multi-precision integers algorithms.
11 12 13 14 15


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

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

davxy's avatar
davxy committed
24

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

### Block ciphers
29

Davide Galassi's avatar
Davide Galassi committed
30
- AES (Rijndael)
davxy's avatar
davxy committed
31
- DES and Triple DES
32

Davide Galassi's avatar
Davide Galassi committed
33
### Block ciphers mode of operation
34

Davide Galassi's avatar
Davide Galassi committed
35 36 37 38 39
- ECB (electronic codebook)
- CBC (cipher block chaining)
- CFB (cipher feedback)
- CTR (counter)
- GCM (Galois counter mode)
40

Davide Galassi's avatar
Davide Galassi committed
41
### Stream ciphers
Davide Galassi's avatar
Davide Galassi committed
42 43 44 45

- Trivium


davxy's avatar
davxy committed
46 47 48 49
Public key algorithms
---------------------

### Ciphers
50 51 52

- RSA (PKCS#1 v1.5)

davxy's avatar
davxy committed
53 54
### Secret exchange

55 56
- Diffie-Hellman (DH)
- ECDH
davxy's avatar
davxy committed
57

58 59 60 61 62 63
### Digital signature

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

64

davxy's avatar
davxy committed
65 66 67 68
Elliptic Curve
--------------

- Basic arithmetic (add,dbl,mul)
Davide Galassi's avatar
Davide Galassi committed
69
- NIST-P256 EC parameters
davxy's avatar
davxy committed
70 71


72 73 74
Pseudo random numbers generators
--------------------------------

Davide Galassi's avatar
Davide Galassi committed
75
- AES-CTR CSPRNG
76 77
- Posix CSPRNG (using '/dev/urandom')
- Windows CSPRNG (using 'CryptGenRandom')
Davide Galassi's avatar
Davide Galassi committed
78
- Weak portable PRNG
davxy's avatar
davxy committed
79

davxy's avatar
davxy committed
80 81 82
Message authentication code
---------------------------

83
- HMAC
84
- CMAC
davxy's avatar
davxy committed
85

davxy's avatar
davxy committed
86

davxy's avatar
davxy committed
87 88 89
Hash
----

Davide Galassi's avatar
Davide Galassi committed
90
### Secure hash
davxy's avatar
davxy committed
91 92 93 94 95 96 97

- MD5
- SHA-256

### CRC

- CRC16-CCITT
98
- CRC16-IBM
99
- CRC16-DNP
davxy's avatar
davxy committed
100
- CRC32-Ethernet
davxy's avatar
davxy committed
101

davxy's avatar
davxy committed
102

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

### Substitution ciphers

- Hill cipher
109
- Polyalphabetic Affine cipher
110 111


112 113 114 115
Utilities
---------

- Base64 encoder/decoder
Davide Galassi's avatar
Davide Galassi committed
116
- Memxor