elliptic_sys/
lib.rs

1extern crate libc;
2
3use libc::{c_int, c_ulong, c_uchar};
4
5#[test]
6fn it_works() {
7}
8
9#[link(name = "curve25519-donna")]
10extern {
11    pub fn curve25519_donna(mypublic: *mut c_uchar,
12                            secret: *const c_uchar,
13                            basepoint: *const c_uchar) -> c_int;
14}
15
16#[link(name = "ref10_extract")]
17extern {
18    pub fn curve25519_keygen(curve25519_pubkey_out: *mut c_uchar,
19                             curve25519_privkey_in: *const c_uchar);
20    pub fn curve25519_sign(signature_out: *mut c_uchar,
21                           curve25519_privkey: *const c_uchar,
22                           msg: *const c_uchar,
23                           msg_len: c_ulong,
24                           random: *const c_uchar) -> c_int;
25    pub fn curve25519_verify(signature: *const c_uchar,
26                             curve25519_pubkey: *const c_uchar,
27                             msg: *const c_uchar,
28                             msg_len: c_ulong) -> c_int;
29}