Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/discretetom/rawrsa
Golang implementation of textbook RSA.
https://github.com/discretetom/rawrsa
Last synced: about 1 month ago
JSON representation
Golang implementation of textbook RSA.
- Host: GitHub
- URL: https://github.com/discretetom/rawrsa
- Owner: DiscreteTom
- Created: 2020-10-05T09:16:02.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-06T12:25:30.000Z (about 4 years ago)
- Last Synced: 2024-06-21T09:01:44.477Z (5 months ago)
- Language: Go
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rawrsa
This repository is a golang implementation of the textbook RSA encryption.
**DO NOT USE THIS REPO IN PRODUCTION ENVIRONMENTS!**
## Installation
```
go get github.com/DiscreteTom/rawrsa
```## Usage
See the [example code](https://github.com/DiscreteTom/rawrsa/blob/master/examples/helloworld.go).
Structures:
```go
type RawRsa struct {
rsa.PrivateKey
}
```APIs:
```go
func NewRawRsa(random io.Reader, bits int) (*RawRsa, error)
func (rr *RawRsa) RawEncrypt(secretMsg *big.Int) (ciphertext *big.Int)
func (rr *RawRsa) RawDecrypt(ciphertext *big.Int) (secretMsg *big.Int)
func (rr *RawRsa) Save(fileName string) error
func Load(fileName string) (*RawRsa, error)
```