mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-12 19:36:27 +08:00
59 lines
1.8 KiB
Plaintext
59 lines
1.8 KiB
Plaintext
=pod
|
||
|
||
=encoding utf8
|
||
|
||
=head1 NAME
|
||
|
||
ZUC_set_key, ZUC_generate_keystream, ZUC_generate_keyword - ZUC Stream Cipher
|
||
|
||
=head1 SYNOPSIS
|
||
|
||
#include <openssl/zuc.h>
|
||
|
||
void ZUC_set_key(ZUC_KEY *key, const unsigned char *user_key, const unsigned char *iv);
|
||
void ZUC_generate_keystream(ZUC_KEY *key, size_t nwords, uint32_t *words);
|
||
uint32_t ZUC_generate_keyword(ZUC_KEY *key);
|
||
|
||
=head1 DESCRIPTION
|
||
|
||
ZUC_set_key() sets up the B<ZUC_KEY> key using the B<user_key> and initial vector B<iv>.
|
||
|
||
ZUC_set_key()通过用户的密钥B<user_key>以及初始向量B<iv>来设置密钥结构B<ZUC_KEY>。
|
||
|
||
ZUC_generate_keystream() computes 32-bit keywords for B<nwords> times by a B<ZUC_KEY> structure, and stores them in the given B<words> array(pointer).
|
||
|
||
ZUC_generate_keystream()通过函数参数中的B<ZUC_KEY>结构计算B<nwords>个32-bit的密钥字,并装入给定的B<words>数组中。
|
||
|
||
ZUC_generate_keyword() is simliar to ZUC_generate_keystream(), but computes keyword only once and return this value.
|
||
|
||
ZUC_generate_keyword()与ZUC_generate_keystream()相似,但只计算一次并直接返回该密钥字的值。
|
||
|
||
=head1 RETURN VALUES
|
||
|
||
ZUC_set_key() and ZUC_generate_keystream() have no return value.
|
||
|
||
ZUC_set_key()和ZUC_generate_keystream()无返回值。
|
||
|
||
ZUC_generate_keyword() returns a 32-bit unsigned integer.
|
||
|
||
ZUC_generate_keyword()返回一个32位无符号整数。
|
||
|
||
=head1 CONFORMING TO
|
||
|
||
GM/T 0004-2012 SM3 Cryptogrpahic Hash Algorithm.
|
||
|
||
=head1 SEE ALSO
|
||
|
||
L<EVP_DigestInit(3)>
|
||
|
||
=head1 COPYRIGHT
|
||
|
||
Copyright 2014-2019 The GmSSL Project. All Rights Reserved.
|
||
|
||
Licensed under the GmSSL license (the "License"). You may not use
|
||
this file except in compliance with the License. You can obtain a copy
|
||
in the file LICENSE in the source distribution or at
|
||
L<http://gmssl.org/license.html>.
|
||
|
||
=cut
|