rsa

package
v3.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package rsa shows a simple implementation of RSA algorithm

Index

Constants

This section is empty.

Variables

View Source
var ErrorFailedToDecrypt = errors.New("failed to Decrypt")

ErrorFailedToDecrypt Raised when Decrypt function fails to decrypt the encrypted message

View Source
var ErrorFailedToEncrypt = errors.New("failed to Encrypt")

ErrorFailedToEncrypt Raised when Encrypt function fails to encrypt the message

Functions

func Decrypt

func Decrypt(encrypted []rune, privateExponent, modulus int64) (string, error)

Decrypt decrypts encrypted rune slice based on the RSA algorithm

func Encrypt

func Encrypt(message []rune, publicExponent, modulus int64) ([]rune, error)

Encrypt encrypts based on the RSA algorithm - uses modular exponentitation in math directory

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL