- NAME
- SYNOPSIS
- DESCRIPTION
- RETURN VALUES
- CONFORMING TO
- SEE ALSO
- COPYRIGHT

# NAME

ZUC_set_key, ZUC_generate_keystream, ZUC_generate_keyword - ZUC Stream Cipher

# 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);

# DESCRIPTION

ZUC_set_key() sets up the ZUC_KEY key using the user_key and initial vector iv.

ZUC_set_key()通过用户的密钥user_key以及初始向量iv来设置密钥结构ZUC_KEY。

ZUC_generate_keystream() computes 32-bit keywords for nwords times by a ZUC_KEY structure, and stores them in the given words array(pointer).

ZUC_generate_keystream()通过函数参数中的ZUC_KEY结构计算nwords个32-bit的密钥字，并装入给定的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()相似，但只计算一次并直接返回该密钥字的值。

# 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位无符号整数。

# CONFORMING TO

GM/T 0004-2012 SM3 Cryptogrpahic Hash Algorithm.

# SEE ALSO

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 http://gmssl.org/license.html.