forsyth20121205-174063a80cc13 years agoHistory
98 lines · 2.4 KB · Text
RawDownload
.TH CRYPT-INTRO 2.SH NAMECrypt intro \- introduction to the.B Cryptcryptographymodule.SH SYNOPSIS.EXinclude "ipints.m";ipints := load IPints IPints->PATH;IPint: import ipints; include "crypt.m";crypt := load Crypt Crypt->PATH;.EE.SH DESCRIPTION.B Cryptcontains a mixed set of functions that variously:.IP \(buform cryptographically secure digests; see.IR crypt-sha1 (2).IP \(bugenerate public/private key pairs; see.IR crypt-gensk (2).IP \(buencrypt data, using AES, DES, or IDEA; see.IR crypt-crypt (2).IP \(bucreate and verify cryptographic signatures using thepublic keys; see.IR crypt-sign (2).SS "Public Key Cryptography"Public key cryptography has many uses.Inferno relies on it only for digital signatures.The private key may be used to digitallysign data, the public one to verify the signature..PPInferno provides three data types to represent the different components of the public key signature scheme.The.B PKadt contains the data necessary to construct a public key;the.B SKadt contains the data necessary to construct a secret key.A key contains the public or secret parameters for the signature algorithm specified by the adt's pick tag.Ownership of a key is not recorded in the key value itself but in a separate certificate.Finally,the.B PKsigadt contains one or more values representing a given form of digital signature..PPCertificates and indeed signature representations are varied, and implemented by other modules..SS "Large Precision Arithmetic"Many.B Cryptoperations require integers much larger than.B intor.BR big .It therefore uses the multiple-precision package.IR ipints (2).That module's.B IPintadtstands for infinite precision integer, though, forspace considerations, ourimplementation limits the maximum integer to2\u\s-2\&8192\s0\d-1..PPAn.B IPintcan be converted into two external formats.The first isan array of bytes in which the first byte is the highest orderbyte of the integer.  This format is useful whencommunicating with the.IR ssl (3)device.The second is similar but represents the array of bytes as text, using either base 16 or a MIME base 64 format,allowing.BR IPint sto be stored in files or transmitted acrossnetworks in a human readable form..SH SOURCE.br.B /libinterp/crypt.c.br.B /libinterp/ipint.c.br.B /libmp.br.B /libsec.SH SEE ALSO.IR security-intro (2).brB. Schneier,.IR "Applied Cryptography" ,1996, J. Wiley & Sons, Inc.