rsa

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Der2PemCmd = &cmd.Command{
	Name:  "rsa-der2pem",
	Run:   runDer2Pem,
	Brief: "Convert RSA key from PKCS#1 ASN.1 DER to PEM",

	Usage: `Usage: pocryp rsa-der2pem -priv/-pub [-in INPUT] [-out OUTPUT]

Convert RSA key from PKCS#1 ASN.1 DER to PEM.

If -in is not specified, stdin will be read.
If -out is not specified, the output will be printed to stdout.

DER input must be specified in binary form.
`,
}
View Source
var Der2RawCmd = &cmd.Command{
	Name:  "rsa-der2raw",
	Run:   runDer2Raw,
	Brief: "Convert RSA key from PKCS#1 ASN.1 DER to raw values(n, e, d, p, q)",

	Usage: `pocryp rsa-der2raw -priv/-pub DER

Convert RSA key from PKCS#1 ASN.1 DER to raw values(n, e, d, p, q).

DER must be specified in hex form.
`,
}
View Source
var Pem2DerCmd = &cmd.Command{
	Name:  "rsa-pem2der",
	Run:   runPem2Der,
	Brief: "Convert RSA key from PEM to PKCS#1 ASN.1 DER",

	Usage: `Usage: pocryp rsa-pem2der [-bin] [-in INPUT] [-out OUTPUT]

Convert RSA key from PEM to PKCS#1 ASN.1 DER.

If -in is not specified, stdin will be read.
If -out is not specified, the output will be printed to stdout.
`,
}
View Source
var Priv2PubCmd = &cmd.Command{
	Name:  "rsa-priv2pub",
	Run:   runPriv2Pub,
	Brief: "Extract RSA public key from private key",

	Usage: `Usage: pocryp rsa-priv2pub [-in INPUT] [-out OUTPUT]

Extract RSA public key from private key, specified as PEM.

If -in is not specified, stdin will be read.
If -out is not specified, the output will be printed to stdout.
`,
}
View Source
var Raw2DerCmd = &cmd.Command{
	Name:  "rsa-raw2der",
	Run:   runRaw2Der,
	Brief: "Convert RSA key from raw values(n, e, d, p, q) to PKCS#1 ASN.1 DER",

	Usage: `Usage: pocryp rsa-raw2der [-priv|-pub] -n modulus [-e publicExponent] -d privateExponent [-p prime1 -q prime2]

Convert RSA key from raw values(n, e, d, p, q) to PKCS#1 ASN.1 DER.
`,
}

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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