PLSM4InitKey
Cryptography
Description
Derives the 32 round keys of SM4 from a 16-byte key into TP LSM4Context
Syntax
Delphi
Procedure PLSM4InitKey(Var Context: TPLSM4Context; Const Key: AnsiString);Parameters
| Context | Round-key context to initialise |
|---|---|
| Key | Exactly 16 bytes; a wrong key length leaves the context zeroed and every later block call returns an empty string |
Remarks
Part of the pure-Pascal SM4 block cipher (GB/T 32907-2016); the implementation passes the standard single-block vector, the published first round key and the one-million-iteration vector
See also
PLSM4EncryptBlock, PLSM4DecryptBlock, SM4EncryptECB, SM4EncryptCBC