Debian Codegraph @

skein/constants.go

raw symbols SCIP
1 // Use of this source code is governed by a license
2 // that can be found in the LICENSE file
3
4 package skein
5
6 import "github.com/enceve/crypto/skein/threefish"
7
8 const (
9 // The blocksize of Skein-512 in bytes.
10 BlockSize = threefish.BlockSize512
11 )
12
13 // The different parameter types
14 const (
15 // CfgKey is the config type for the Key.
16 CfgKey uint64 = 0
17
18 // CfgConfig is the config type for the configuration.
19 CfgConfig uint64 = 4
20
21 // CfgPersonal is the config type for the personalization.
22 CfgPersonal uint64 = 8
23
24 // CfgPublicKey is the config type for the public key.
25 CfgPublicKey uint64 = 12
26
27 // CfgKeyID is the config type for the key id.
28 CfgKeyID uint64 = 16
29
30 // CfgNonce is the config type for the nonce.
31 CfgNonce uint64 = 20
32
33 // CfgMessage is the config type for the message.
34 CfgMessage uint64 = 48
35
36 // CfgOutput is the config type for the output.
37 CfgOutput uint64 = 63
38
39 // FirstBlock is the first block flag
40 FirstBlock uint64 = 1 << 62
41
42 // FinalBlock is the final block flag
43 FinalBlock uint64 = 1 << 63
44
45 // The skein schema ID = S H A 3 1 0 0 0
46 SchemaID uint64 = 0x133414853
47 )
48
49 // Precomputed chain values for Skein-512
50 var iv160 = [9]uint64{
51 0x28B81A2AE013BD91, 0xC2F11668B5BDF78F, 0x1760D8F3F6A56F12, 0x4FB747588239904F,
52 0x21EDE07F7EAF5056, 0xD908922E63ED70B8, 0xB8EC76FFECCB52FA, 0x01A47BB8A3F27A6E,
53 0,
54 }
55
56 var iv256 = [9]uint64{
57 0xCCD044A12FDB3E13, 0xE83590301A79A9EB, 0x55AEA0614F816E6F, 0x2A2767A4AE9B94DB,
58 0xEC06025E74DD7683, 0xE7A436CDC4746251, 0xC36FBAF9393AD185, 0x3EEDBA1833EDFC13,
59 0,
60 }
61
62 var iv384 = [9]uint64{
63 0xA3F6C6BF3A75EF5F, 0xB0FEF9CCFD84FAA4, 0x9D77DD663D770CFE, 0xD798CBF3B468FDDA,
64 0x1BC4A6668A0E4465, 0x7ED7D434E5807407, 0x548FC1ACD4EC44D6, 0x266E17546AA18FF8,
65 0,
66 }
67
68 var iv512 = [9]uint64{
69 0x4903ADFF749C51CE, 0x0D95DE399746DF03, 0x8FD1934127C79BCE, 0x9A255629FF352CB1,
70 0x5DB62599DF6CA7B0, 0xEABE394CA9D5C3F4, 0x991112C71A75B523, 0xAE18A40B660FCC33,
71 0,
72 }