https://github.com/priyanshujain/crypto
A simplified crypto module using go crypto library
https://github.com/priyanshujain/crypto
aes cryptography hmac rsa sha
Last synced: 4 months ago
JSON representation
A simplified crypto module using go crypto library
- Host: GitHub
- URL: https://github.com/priyanshujain/crypto
- Owner: priyanshujain
- License: mit
- Created: 2022-05-26T04:41:01.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-06-05T10:53:02.000Z (over 3 years ago)
- Last Synced: 2024-06-20T22:36:42.168Z (over 1 year ago)
- Topics: aes, cryptography, hmac, rsa, sha
- Language: Go
- Homepage:
- Size: 191 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# crypto
simplified crypto module using go crypto library. We are not implementing any crypto algorithms on our own but taking it
from NIST approved implementation and providing an easy interface to use them.[](https://pkg.go.dev/github.com/priyanshujain/crypto)
[](https://github.com/priyanshujain/crypto/actions)
[](https://codecov.io/gh/priyanshujain/crypto)
[](https://goreportcard.com/report/github.com/priyanshujain/crypto)## Install
```
go get github.com/priyanshujain/crypto
```## Testing
1. perform tests
```
make test
```2. produces coverage
```
make cover
```3. run go vet linter
```
make lint
```## Packages
1. cipher: It includes both symmetric(AES) and asymmetric(RSA) key encryption.2. signature: It includes signature algorithms like HMAC, RSA etc.
3. hash: It has common hash functions including SHA1 and SHA256.
4. Keystore: It implements key store and key generation for common cryptographic algorithms.
### cipher
#### AES
It support the following modes of operations
1. CBC (https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_block_chaining_(CBC))
2. CTR (https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Counter_(CTR))
3. CFB (https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_feedback_(CFB))and the following padding schemes
1. PKCS5 (https://en.wikipedia.org/wiki/Padding_(cryptography)#PKCS#5_and_PKCS#7)
2. PKCS7#### RSA
It supports the following encryption schemes
1. PKCS1 (https://datatracker.ietf.org/doc/html/rfc3447)
2. OAEP (https://en.wikipedia.org/wiki/Optimal_asymmetric_encryption_padding)### signature
#### RSA
It supports the following signature schemes
1. PKCS1 (https://en.wikipedia.org/wiki/PKCS_1)
2. PSS (https://en.wikipedia.org/wiki/Probabilistic_signature_scheme)## Notes
1. It uses pem format for all public key infrastructure.