Botan 1.10.17
seed.h
Go to the documentation of this file.
1/*
2* SEED
3* (C) 1999-2007 Jack Lloyd
4*
5* Distributed under the terms of the Botan license
6*/
7
8#ifndef BOTAN_SEED_H__
9#define BOTAN_SEED_H__
10
11#include <botan/block_cipher.h>
12
13namespace Botan {
14
15/**
16* SEED, a Korean block cipher
17*/
18class BOTAN_DLL SEED : public Block_Cipher_Fixed_Params<16, 16>
19 {
20 public:
21 void encrypt_n(const byte in[], byte out[], size_t blocks) const;
22 void decrypt_n(const byte in[], byte out[], size_t blocks) const;
23
24 void clear() { zeroise(K); }
25 std::string name() const { return "SEED"; }
26 BlockCipher* clone() const { return new SEED; }
27
28 SEED() : K(32) {}
29 private:
30 void key_schedule(const byte[], size_t);
31
32 class G_FUNC
33 {
34 public:
35 u32bit operator()(u32bit) const;
36 private:
37 static const u32bit S0[256], S1[256], S2[256], S3[256];
38 };
39
40 SecureVector<u32bit> K;
41 };
42
43}
44
45#endif
std::string name() const
Definition seed.h:25
BlockCipher * clone() const
Definition seed.h:26
void decrypt_n(const byte in[], byte out[], size_t blocks) const
Definition seed.cpp:65
void clear()
Definition seed.h:24
void encrypt_n(const byte in[], byte out[], size_t blocks) const
Definition seed.cpp:25
void zeroise(MemoryRegion< T > &vec)
Definition secmem.h:428
unsigned int u32bit
Definition types.h:32