go_chacha20poly1305_openssh/consts_test.go

80 lines
3.1 KiB
Go

package cc20p1305ssh
var (
/*
testKdfKey is the key that would be returned by bcrypt_pbkdf.
It would be created using the passphrase (seed) "test", with 16 rounds,
and 64 bytes keysize.
*/
testKdfKey []byte = []byte{
// 64 bytes
0xd7, 0xe4, 0x7e, 0xf3, 0x7c, 0xfd, 0x80, 0x6d,
0x48, 0xfd, 0x8b, 0x46, 0xec, 0x53, 0x51, 0xef,
0x3f, 0x15, 0xf8, 0xb0, 0xa2, 0x30, 0xcf, 0x60,
0x2c, 0x09, 0xdd, 0x44, 0x91, 0xe9, 0x54, 0xc8,
0x72, 0x03, 0x15, 0xe4, 0x83, 0x54, 0x30, 0xca,
0x8a, 0xe1, 0x9b, 0x15, 0x3f, 0xbc, 0xbe, 0x45,
0x17, 0xc5, 0x03, 0xe0, 0xc9, 0xda, 0x77, 0xff,
0xe5, 0x95, 0xa3, 0x33, 0x17, 0xad, 0x4d, 0xe7,
}
// testPoly1305Tag is the poly1305 tag.
testPoly1305Tag []byte = []byte{
// 16 bytes
0x7d, 0x98, 0x49, 0xd7,
0x60, 0x2b, 0x49, 0xf9,
0xcf, 0xa0, 0x2d, 0x9f,
0x39, 0x66, 0x2c, 0x66,
}
// testEncBlock is the encrypted private key of an example ssh-ed25519 private key, encrypted with the passphrase "test" (block "4.0.1" in go_sshkeys).
// We skip the KDF for tests, though (see testKdfKey).
testEncBlock []byte = []byte{
// 152 bytes
0x9b, 0x24, 0x63, 0x64, 0xe7, 0xbe, 0xf7, 0xc1,
0xc7, 0x20, 0xe1, 0x0e, 0xce, 0x79, 0x3b, 0x7c,
0xe0, 0x61, 0xa4, 0xa8, 0xf3, 0x2c, 0x18, 0x36,
0x3b, 0xb3, 0x85, 0x82, 0xfd, 0xed, 0x5d, 0xb6,
0xd3, 0xb5, 0x93, 0x16, 0x3c, 0x5d, 0x06, 0xaa,
0xb4, 0x9f, 0xc4, 0x6a, 0x87, 0xa1, 0xcb, 0x29,
0xa0, 0x8f, 0x53, 0x99, 0x2b, 0x86, 0x56, 0xc5,
0xf5, 0xaf, 0xeb, 0x1b, 0x86, 0x5c, 0x0e, 0x21,
0x52, 0x4f, 0xf4, 0x76, 0xb8, 0x1d, 0x8a, 0x8b,
0xaa, 0xda, 0x2a, 0xed, 0x08, 0xc1, 0xcb, 0x21,
0x8a, 0x6a, 0x2e, 0xa5, 0x2d, 0x9d, 0x01, 0xe7,
0x4c, 0x7b, 0x2e, 0x42, 0x30, 0x51, 0x64, 0x5f,
0x9f, 0x46, 0xa6, 0x2b, 0x15, 0x73, 0xd2, 0xfa,
0xa4, 0xf4, 0xdc, 0xe9, 0xfd, 0xf8, 0x91, 0xa3,
0x11, 0xb5, 0xce, 0x18, 0xd7, 0x4a, 0xff, 0xa9,
0xea, 0xd3, 0x7d, 0x44, 0xd0, 0xba, 0xec, 0x16,
0xc3, 0xc6, 0xcd, 0x1d, 0xa2, 0x2d, 0x25, 0x17,
0x45, 0x98, 0x9b, 0x7d, 0x06, 0xf2, 0x77, 0x17,
0x54, 0xd2, 0xee, 0xc6, 0xa6, 0x64, 0xbc, 0x9a,
}
// testPlainBlock should match the decrypted block of testEncBlock.
testPlainBlock []byte = []byte{
// 152 bytes
0x09, 0xf4, 0xb5, 0x8f, 0x09, 0xf4, 0xb5, 0x8f,
0x00, 0x00, 0x00, 0x0b, 0x73, 0x73, 0x68, 0x2d,
0x65, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x00,
0x00, 0x00, 0x20, 0xb8, 0xd3, 0x93, 0x30, 0x65,
0x72, 0xa6, 0xe5, 0x7e, 0x22, 0xa1, 0x64, 0x5b,
0x97, 0x9b, 0x01, 0x60, 0x7b, 0xdb, 0x1d, 0xcd,
0xcf, 0x92, 0x01, 0xd4, 0x80, 0xc3, 0xa9, 0x0a,
0xbd, 0xad, 0x20, 0x00, 0x00, 0x00, 0x40, 0x2d,
0xad, 0x50, 0x3f, 0x38, 0x88, 0xe2, 0xc1, 0x57,
0x0b, 0x1c, 0xa4, 0xcf, 0xbc, 0x7c, 0x39, 0xac,
0x19, 0xf2, 0x7b, 0x02, 0xac, 0x91, 0x1b, 0xd6,
0x05, 0x06, 0x00, 0xff, 0xe9, 0xb6, 0x83, 0xb8,
0xd3, 0x93, 0x30, 0x65, 0x72, 0xa6, 0xe5, 0x7e,
0x22, 0xa1, 0x64, 0x5b, 0x97, 0x9b, 0x01, 0x60,
0x7b, 0xdb, 0x1d, 0xcd, 0xcf, 0x92, 0x01, 0xd4,
0x80, 0xc3, 0xa9, 0x0a, 0xbd, 0xad, 0x20, 0x00,
0x00, 0x00, 0x14, 0x62, 0x74, 0x73, 0x40, 0x64,
0x61, 0x77, 0x69, 0x64, 0x2e, 0x72, 0x30, 0x30,
0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x01,
}
)