Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/awgh/bencrypt
Encryption Abstraction Layer and Utilities for ratnet
https://github.com/awgh/bencrypt
Last synced: 28 days ago
JSON representation
Encryption Abstraction Layer and Utilities for ratnet
- Host: GitHub
- URL: https://github.com/awgh/bencrypt
- Owner: awgh
- License: mit
- Created: 2016-06-10T00:00:24.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-05-03T10:00:48.000Z (7 months ago)
- Last Synced: 2024-10-31T09:02:30.328Z (about 1 month ago)
- Language: Go
- Homepage: https://awgh.github.io/bencrypt
- Size: 81.1 KB
- Stars: 17
- Watchers: 4
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: license.txt
Awesome Lists containing this project
- cybersecurity-golang-security - bencrypt - Encryption Abstraction Layer and Utilities. (Encryption)
- awesome-go-security - bencrypt - Encryption Abstraction Layer and Utilities. (Encryption)
README
# What is Bencrypt?
Bencrypt is an abstraction layer for cryptosystems in Go, that lets applications use hybrid cryptosystems without being coupled to their internal workings. It lets applications easily switch between using ECC or RSA, for example.
Implementations of both ECC-based and RSA-based systems are included, as are a collection of generally-useful crypto utilities, such as:
- PKCS7 Padding/Unpadding
- AES-CBC symmetric encrypt/decrypt
- SSL Certificate Generation in both RSA and ECC modesBencrypt was developed to provide a layer of abstraction for cryptosystems below the [ratnet project](https://github.com/awgh/ratnet).
# DocumentationAPI Docs are availble here: https://godoc.org/github.com/awgh/bencrypt
# Usage
In normal usage, you will want to include at least two packages:
- "bencrypt/bc" - This contains the API and interfaces, you'll need this every time
Then, include each cryptosystem definition that you want to use. Two of them are included with bencrypt at the moment:
- "bencrypt/ecc" - A hybrid cryptosystem using Curve25519, AES-CBC-256, and HMAC-SHA-256.
- "bencrypt/rsa" - A hybrid cryptosystem using RSA-4096, AES-CBC-256, and HMAC-SHA-256.# Add Your Own CryptoSystem
To add your own cryptosystem to bencrypt:
- Make a new package and include "bencrypt/bc".
- Create an implementation of [bc.PubKey](https://godoc.org/github.com/awgh/bencrypt/bc#PubKey) for your system.
- Create an implementation of [bc.KeyPair](https://godoc.org/github.com/awgh/bencrypt/bc#KeyPair) for your system.
Then, to use it, just include your system instead of "bencrypt/ecc" or "bencrypt/rsa" in your app.# Related Projects
- [Bencrypt, crypto abstraction layer & utils](https://github.com/awgh/bencrypt)
- [Ratnet, onion-routed messaging system with pluggable transports](https://github.com/awgh/ratnet)
- [HushCom, simple IRC-like client & server](https://github.com/awgh/hushcom)# Authors and Contributors
[email protected] (@awgh)