Skip to content
This repository was archived by the owner on Jan 2, 2026. It is now read-only.

DiscreteTom/rawrsa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

Structures:

type RawRsa struct {
	rsa.PrivateKey
}

APIs:

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)

About

Golang implementation of textbook RSA.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages