summaryrefslogtreecommitdiff
path: root/sys/man/2
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2016-02-01 21:34:49 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2016-02-01 21:34:49 +0100
commita291bbdeddfd41a2f0907ecbd7b819f0eedffdaf (patch)
treec5dd22efd770099846596d546dd36ba4b2d7ffc6 /sys/man/2
parent0bfac109a491e61d7cd585060b88e1251da1e928 (diff)
libsec: ecdsa client support for tlshand, cleanups
Diffstat (limited to 'sys/man/2')
-rw-r--r--sys/man/2/ec19
-rw-r--r--sys/man/2/rsa15
2 files changed, 27 insertions, 7 deletions
diff --git a/sys/man/2/ec b/sys/man/2/ec
index 431c15cfa..b4e0cc19e 100644
--- a/sys/man/2/ec
+++ b/sys/man/2/ec
@@ -19,6 +19,12 @@ ecdsaverify \- elliptic curve cryptography
.B #include <libsec.h>
.PP
.B
+void ecdominit(ECdomain *dom, void (*init)(mpint *p, mpint *a, mpint *b, mpint *x, mpint *y, mpint *n, mpint *h));
+.PP
+.B
+void ecdomfree(ECdomain *dom);
+.PP
+.B
void ecassign(ECdomain *dom, ECpoint *old, ECpoint *new);
.PP
.B
@@ -54,6 +60,19 @@ Points on the curve are represented by
.B ECpoint
structs.
.PP
+.B ecdominit
+initializes a
+.B ECdomain
+struct and calls the
+.B init
+function such as
+.B secp256r1
+which fills in the parameters of the curve.
+.PP
+.B ecdomfree
+frees the parameters of the curve and zeros the struct. It does
+not free the memory of the struct itself.
+.PP
.BR ecassign ", " ecadd " and " ecmul
are analogous to their counterparts in
.IR mp (2).
diff --git a/sys/man/2/rsa b/sys/man/2/rsa
index 957ac05c2..f4ad430b9 100644
--- a/sys/man/2/rsa
+++ b/sys/man/2/rsa
@@ -12,8 +12,9 @@ rsaprivtopub,
rsapuballoc,
rsapubfree,
X509toRSApub,
-X509gen,
-X509verify \- RSA encryption algorithm
+X509rsagen,
+X509rsareq,
+X509rsaverify \- RSA encryption algorithm
.SH SYNOPSIS
.B #include <u.h>
.br
@@ -61,13 +62,13 @@ void asn1dump(uchar *der, int len)
uchar* decodePEM(char *s, char *type, int *len, char **new_s)
.PP
.B
-uchar* X509gen(RSApriv *priv, char *subj, ulong valid[2], int *certlen);
+uchar* X509rsagen(RSApriv *priv, char *subj, ulong valid[2], int *certlen);
.PP
.B
-uchar* X509req(RSApriv *priv, char *subj, int *certlen);
+uchar* X509rsareq(RSApriv *priv, char *subj, int *certlen);
.PP
.B
-char* X509verify(uchar *cert, int ncert, RSApub *pk)
+char* X509rsaverify(uchar *cert, int ncert, RSApub *pk)
.DT
.SH DESCRIPTION
RSA is a public key encryption algorithm. The owner of a key publishes
@@ -147,12 +148,12 @@ to convert to binary before computing the fingerprint or calling
For the special case of
certificates signed by a known trusted key
(in a single step, without certificate chains),
-.I X509verify
+.I X509rsaverify
checks the signature on
.IR cert .
It returns nil if successful, else an error string.
.PP
-.I X509gen
+.I X509rsagen
creates a self-signed X.509 certificate, given an RSA keypair
.IR priv ,
a issuer/subject string