Update SecretKey to 32 bytes (#1072)

* Update SecretKey to 32 bytes

Signed-off-by: Kirk Baird <baird.k@outlook.com>

* Stop test from padding to 48 bytes

Signed-off-by: Kirk Baird <baird.k@outlook.com>

* Fix keypair file secret key length

Signed-off-by: Kirk Baird <baird.k@outlook.com>
This commit is contained in:
Kirk Baird
2020-04-28 18:27:33 +10:00
committed by GitHub
parent 1abb54dabd
commit c102d9d1f9
8 changed files with 15 additions and 24 deletions

View File

@@ -56,7 +56,7 @@ mod reals {
pub const BLS_AGG_SIG_BYTE_SIZE: usize = 96;
pub const BLS_SIG_BYTE_SIZE: usize = 96;
pub const BLS_SECRET_KEY_BYTE_SIZE: usize = 48;
pub const BLS_SECRET_KEY_BYTE_SIZE: usize = 32;
pub const BLS_PUBLIC_KEY_BYTE_SIZE: usize = 48;
use eth2_hashing::hash;

View File

@@ -80,9 +80,8 @@ mod tests {
#[test]
pub fn test_ssz_round_trip() {
let byte_key = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 211, 210, 129, 231, 69, 162, 234,
16, 15, 244, 214, 126, 201, 0, 85, 28, 239, 82, 121, 208, 190, 223, 6, 169, 202, 86,
236, 197, 218, 3, 69,
3, 211, 210, 129, 231, 69, 162, 234, 16, 15, 244, 214, 126, 201, 0, 85, 28, 239, 82,
121, 208, 190, 223, 6, 169, 202, 86, 236, 197, 218, 3, 69,
];
let original = SecretKey::from_bytes(&byte_key).unwrap();