forsyth20121205-174063a80cc13 years agoHistory
94 lines · 2.4 KB · Text
RawDownload
.TH CRYPT-DSAGEN 2.SH NAMEcrypt: dsagen, eggen, rsagen, rsafill,  rsaencrypt, rsadecrypt \- specific public key systems.SH SYNOPSIS.EXinclude "ipints.m";ipints := load IPints IPints->PATH;IPint: import ipints; include "crypt.m";crypt := load Crypt Crypt->PATH; dsagen:     fn(oldpk: ref PK.DSA): ref SK.DSA; eggen:      fn(nlen: int, nrep: int): ref SK.Elgamal; rsagen:     fn(nlen: int, elen: int, nrep: int): ref SK.RSA;rsafill:    fn(n: ref IPint, ek: ref IPint, dk: ref IPint,               p: ref IPint, q: ref IPint): ref SK.RSA;rsaencrypt: fn(k: ref PK.RSA, m: ref IPint): ref IPint;rsadecrypt: fn(k: ref SK.RSA, m: ref IPint): ref IPint;.EE.SH DESCRIPTION.IR Crypt-gensk (2)describes a set of functions that generate public/private key pairs given an algorithm nameand a key length.Some key types allow further parameters for key generation or support further operations..PP.B Dsagengenerates a DSA public/private key pair, represented by the pick adt.BR SK.DSA ,and compatible with the containing type.BR SK .If the parameter.B oldpkis not nil,.B dsagentakes the new key's modulus and group order from the existing key;otherwise it generates a new pair of primes..PP.B Eggengenerates a new El-Gamal key pair, represented by the pick adt.BR SK.Elgamal ..I Nlenis the length of the modulus;.I nrepis the number of repetitions of the Miller-Rabin primality test (0 gives the default, currently 18)..PP.B Rsagengenerates an RSA public/private key pair, represented by the pick adt.BR SK.RSA ,and compatible with the containing type.BR SK ..I Nlengives the length of the key modulus in bits;.I elengives the exponent length in bits; and.I nrepis as above..PPThe RSA private key representation used by Inferno includes some extra values to speed computation..B Rsagenprovides those values but keys imported from other systems might not.Given the essential set of RSA private key parameters for a given key, represented as IPints,.B rsafillreturns a suitable.B SK.RSAfor that key, including the extra values..PPThe public key of type.B PK.RSAcan be extracted from a given private key value.I skby referencing the field.BI sk .pk ..PP.B Rsaencryptencrypts a message.IR m ,represented by an IPint,using the public key.IR pk ..PP.B Rsadecryptdecrypts.I musing private key.IR sk .The result is again returned as an IPint..SH SEE ALSO.IR crypt-gensk (2),.IR crypt-sha1 (2),.IR security-auth (2),.IR security-oldauth (2)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t