'\" t .\" Title: struct akcipher_alg .\" Author: .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Programming Interface .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "STRUCT AKCIPHER_ALG" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Programming Interface" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" struct_akcipher_alg \- generic public key algorithm .SH "SYNOPSIS" .sp .nf struct akcipher_alg { int (* sign) (struct akcipher_request *req); int (* verify) (struct akcipher_request *req); int (* encrypt) (struct akcipher_request *req); int (* decrypt) (struct akcipher_request *req); int (* set_pub_key) (struct crypto_akcipher *tfm, const void *key,unsigned int keylen); int (* set_priv_key) (struct crypto_akcipher *tfm, const void *key,unsigned int keylen); int (* max_size) (struct crypto_akcipher *tfm); int (* init) (struct crypto_akcipher *tfm); void (* exit) (struct crypto_akcipher *tfm); unsigned int reqsize; struct crypto_alg base; }; .fi .SH "MEMBERS" .PP sign .RS 4 Function performs a sign operation as defined by public key algorithm\&. In case of error, where the dst_len was insufficient, the req\->dst_len will be updated to the size required for the operation .RE .PP verify .RS 4 Function performs a sign operation as defined by public key algorithm\&. In case of error, where the dst_len was insufficient, the req\->dst_len will be updated to the size required for the operation .RE .PP encrypt .RS 4 Function performs an encrypt operation as defined by public key algorithm\&. In case of error, where the dst_len was insufficient, the req\->dst_len will be updated to the size required for the operation .RE .PP decrypt .RS 4 Function performs a decrypt operation as defined by public key algorithm\&. In case of error, where the dst_len was insufficient, the req\->dst_len will be updated to the size required for the operation .RE .PP set_pub_key .RS 4 Function invokes the algorithm specific set public key function, which knows how to decode and interpret the BER encoded public key .RE .PP set_priv_key .RS 4 Function invokes the algorithm specific set private key function, which knows how to decode and interpret the BER encoded private key .RE .PP max_size .RS 4 Function returns dest buffer size required for a given key\&. .RE .PP init .RS 4 Initialize the cryptographic transformation object\&. This function is used to initialize the cryptographic transformation object\&. This function is called only once at the instantiation time, right after the transformation context was allocated\&. In case the cryptographic hardware has some special requirements which need to be handled by software, this function shall check for the precise requirement of the transformation and put any software fallbacks in place\&. .RE .PP exit .RS 4 Deinitialize the cryptographic transformation object\&. This is a counterpart to \fIinit\fR, used to remove various changes set in \fIinit\fR\&. .RE .PP reqsize .RS 4 Request context size required by algorithm implementation .RE .PP base .RS 4 Common crypto API algorithm data structure .RE .SH "AUTHORS" .PP \fBStephan Mueller\fR <\&smueller@chronox.de\&> .RS 4 Author. .RE .PP \fBMarek Vasut\fR <\&marek@denx.de\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br