Skip to content

Commit

Permalink
tests/dh_compute: port dh_compute test from libkeyutils
Browse files Browse the repository at this point in the history
The KDF functions are not yet exposed, so those tests have been skipped
for now.
  • Loading branch information
mathstuf committed Jul 8, 2019
1 parent 3e95087 commit 4a60aa3
Show file tree
Hide file tree
Showing 3 changed files with 240 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ impl Keyring {
}
}

#[cfg(test)]
pub(crate) fn serial(&self) -> KeyringSerial {
self.id
}

/// Set the default keyring to use when implicit requests on the current thread.
///
/// Returns the old default keyring.
Expand Down
234 changes: 234 additions & 0 deletions src/tests/dh_compute.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
// Copyright (c) 2019, Ben Boeckel
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither the name of this project nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

use crate::keytypes::{logon, User};
use crate::{Key, Keyring};

use super::utils;

struct DhKeySet {
private: Key,
prime: Key,
base: Key,
}

fn create_dh_keys(keyring: &mut Keyring) -> DhKeySet {
let private = keyring.add_key::<User, _, _>("dh:private", PRIVATE).unwrap();
let prime = keyring.add_key::<User, _, _>("dh:prime", PRIME).unwrap();
let base = keyring.add_key::<User, _, _>("dh:base", GENERATOR).unwrap();

DhKeySet {
private,
prime,
base,
}
}

#[test]
fn invalid_key() {
let mut keyring = utils::new_test_keyring();
let dh_keys = create_dh_keys(&mut keyring);
let invalid_key = utils::invalid_key();

let err = Key::compute_dh(&invalid_key, &dh_keys.prime, &dh_keys.base).unwrap_err();
assert_eq!(err, errno::Errno(libc::ENOKEY));

let err = Key::compute_dh(&dh_keys.private, &invalid_key, &dh_keys.base).unwrap_err();
assert_eq!(err, errno::Errno(libc::ENOKEY));

let err = Key::compute_dh(&dh_keys.private, &dh_keys.prime, &invalid_key).unwrap_err();
assert_eq!(err, errno::Errno(libc::ENOKEY));
}

#[test]
fn wrong_key_type() {
let mut keyring = utils::new_test_keyring();
let dh_keys = create_dh_keys(&mut keyring);
let desc = logon::Description {
subtype: "dh".into(),
description: "logon".into(),
};
let logon_key = keyring.add_key::<logon::Logon, _, _>(&desc, [0u8]).unwrap();

let err = Key::compute_dh(&logon_key, &dh_keys.prime, &dh_keys.base).unwrap_err();
assert_eq!(err, errno::Errno(libc::ENOKEY));

let err = Key::compute_dh(&dh_keys.private, &logon_key, &dh_keys.base).unwrap_err();
assert_eq!(err, errno::Errno(libc::ENOKEY));

let err = Key::compute_dh(&dh_keys.private, &dh_keys.prime, &logon_key).unwrap_err();
assert_eq!(err, errno::Errno(libc::ENOKEY));
}

#[test]
fn wrong_key_type_keyring() {
let mut keyring = utils::new_test_keyring();
let dh_keys = create_dh_keys(&mut keyring);
let bad_keyring = keyring.add_keyring("wrong_key_type_keyring").unwrap();
let not_a_key = unsafe { Key::new(bad_keyring.serial()) };

let err = Key::compute_dh(&not_a_key, &dh_keys.prime, &dh_keys.base).unwrap_err();
assert_eq!(err, errno::Errno(libc::EOPNOTSUPP));

let err = Key::compute_dh(&dh_keys.private, &not_a_key, &dh_keys.base).unwrap_err();
assert_eq!(err, errno::Errno(libc::EOPNOTSUPP));

let err = Key::compute_dh(&dh_keys.private, &dh_keys.prime, &not_a_key).unwrap_err();
assert_eq!(err, errno::Errno(libc::EOPNOTSUPP));
}

#[test]
fn unavailable_key() {
let mut keyring = utils::new_test_keyring();
let dh_keys = create_dh_keys(&mut keyring);
keyring.unlink_key(&dh_keys.private).unwrap();

let err = Key::compute_dh(&dh_keys.private, &dh_keys.prime, &dh_keys.base).unwrap_err();
assert_eq!(err, errno::Errno(libc::ENOKEY));

let err = Key::compute_dh(&dh_keys.prime, &dh_keys.private, &dh_keys.base).unwrap_err();
assert_eq!(err, errno::Errno(libc::ENOKEY));

let err = Key::compute_dh(&dh_keys.base, &dh_keys.prime, &dh_keys.private).unwrap_err();
assert_eq!(err, errno::Errno(libc::ENOKEY));
}

#[test]
fn dh_public_key() {
let mut keyring = utils::new_test_keyring();
let dh_keys = create_dh_keys(&mut keyring);

let data = Key::compute_dh(&dh_keys.private, &dh_keys.prime, &dh_keys.base).unwrap();
assert_eq!(data, PUBLIC);
}

// Constants generated by:
// % openssl dhparam 4096 -check -out dh.pem
// % openssl genpkey -paramfile dh.pem -text
const PRIVATE: &[u8] = &[
0x58, 0x19, 0x15, 0x61, 0x80, 0x80, 0x80, 0x5e, 0x2b, 0x64, 0x11, 0x95, 0x1c, 0xc6, 0x87, 0xd1,
0xc2, 0xd5, 0x06, 0xa1, 0xfd, 0x73, 0x52, 0x9e, 0xa3, 0xcf, 0xf0, 0x47, 0x7c, 0xc6, 0xf4,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x35, 0xa2, 0x9f, 0xbb, 0xc9, 0xe1,
0x97, 0x53, 0x05, 0xa1, 0xe7, 0xb2, 0x63, 0xbf, 0x38, 0xf1, 0x77, 0x7a, 0xd6, 0xd0, 0x16, 0xd4,
0x60, 0xd4, 0xdd, 0x5d, 0x70, 0xce, 0x08, 0x67, 0x2e, 0x0b, 0xa5, 0x9c, 0x76, 0x73, 0xb7, 0xfa,
];
1 change: 1 addition & 0 deletions src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ pub(crate) mod utils;
mod add;
mod clear;
mod describe;
mod dh_compute;

0 comments on commit 4a60aa3

Please sign in to comment.