Skip to content

Commit 2ef157d

Browse files
committed
refactor: rename final remnants of edhoc-rs to lakers
1 parent a9a3cd0 commit 2ef157d

34 files changed

+34
-38
lines changed

.github/workflows/build-and-test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ jobs:
127127
run: sudo apt-get -y install qemu-system-arm
128128

129129
- name: Run tests in QEMU
130-
run: cd examples/edhoc-rs-no_std && cargo run --target="thumbv7m-none-eabi" --no-default-features --features="${{ matrix.crypto_backend }}, ${{ matrix.ead }}" --release
130+
run: cd examples/lakers-no_std && cargo run --target="thumbv7m-none-eabi" --no-default-features --features="${{ matrix.crypto_backend }}, ${{ matrix.ead }}" --release
131131

132132

133133
build-example-for-cortex-m4:
@@ -150,7 +150,7 @@ jobs:
150150
run: sudo apt-get -y update && sudo apt-get -y install gcc-arm-none-eabi
151151

152152
- name: Build example
153-
run: cd examples/edhoc-rs-no_std && cargo build --target="thumbv7em-none-eabihf" --no-default-features --features="${{ matrix.crypto_backend }}, ${{ matrix.ead }}, rtt" --release
153+
run: cd examples/lakers-no_std && cargo build --target="thumbv7em-none-eabihf" --no-default-features --features="${{ matrix.crypto_backend }}, ${{ matrix.ead }}, rtt" --release
154154

155155

156156
build-coap-example:

Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ members = [
1111
"crypto/lakers-crypto-rustcrypto",
1212
"crypto/lakers-crypto-cryptocell310-sys",
1313
"examples/coap",
14-
"examples/edhoc-rs-no_std",
15-
"examples/edhoc-rs-cc2538",
14+
"examples/lakers-no_std",
15+
"examples/lakers-cc2538",
1616
"lakers-c",
1717
]
1818

@@ -35,7 +35,7 @@ resolver = "2"
3535

3636
[workspace.package]
3737
version = "0.4.1"
38-
repository = "https://github.com/openwsn-berkeley/edhoc-rs/"
38+
repository = "https://github.com/openwsn-berkeley/lakers/"
3939
license = "BSD-3-Clause"
4040
readme = "shared/README.md"
4141

@@ -52,7 +52,7 @@ lakers-crypto-hacspec = { path = "crypto/lakers-crypto-hacspec/" }
5252
lakers-crypto-psa = { path = "crypto/lakers-crypto-psa/" }
5353
lakers-crypto-rustcrypto = { package = "lakers-crypto-rustcrypto", path = "crypto/lakers-crypto-rustcrypto/", version = "^0.4.1" }
5454

55-
edhoc-rs = { package = "lakers", path = "lib/", version = "^0.4.1", default-features = false }
55+
lakers = { package = "lakers", path = "lib/", version = "^0.4.1", default-features = false }
5656

5757
[patch.crates-io]
5858
hacspec-lib = { git = "https://github.com/malishav/hacspec", branch = "aesccm" }

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ To build an example application that works on the [nrf52840dk](https://www.nordi
4949

5050
```bash
5151
# head to the example `no_std` example
52-
cd ./examples/edhoc-rs-no_std
52+
cd ./examples/lakers-no_std
5353

5454
# build using the cryptocell310 crypto backend (hardware-accelerated)
5555
cargo build --target="thumbv7em-none-eabihf" --release

crypto/lakers-crypto-rustcrypto/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ impl<Rng: rand_core::RngCore + rand_core::CryptoRng> CryptoTrait for Crypto<Rng>
116116
1.into(), /* Y coordinate choice does not matter for ECDH operation */
117117
)
118118
// While this can actually panic so far, the proper fix is in
119-
// https://github.com/openwsn-berkeley/edhoc-rs/issues/93 which will justify this to be a
119+
// https://github.com/openwsn-berkeley/lakers/issues/93 which will justify this to be a
120120
// panic (because after that, public key validity will be an invariant of the public key
121121
// type)
122122
.expect("Public key is not a good point");

crypto/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
//! Cryptography dispatch for the edhoc-rs crate
1+
//! Cryptography dispatch for the lakers crate
22
//!
3-
//! This crate is used by edhoc-rs to decide which cryptographic back-end to use. Its presence
4-
//! avoids the need for all edhoc-rs types to be generic over a back-end, which would then be
3+
//! This crate is used by lakers to decide which cryptographic back-end to use. Its presence
4+
//! avoids the need for all lakers types to be generic over a back-end, which would then be
55
//! provided by the user at initialization time. On the long run, its type may turn into a
66
//! default associated type.
77
#![no_std]

examples/coap/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
edition = "2021"
55

66
[dependencies]
7-
edhoc-rs = { package = "lakers", path = "../../lib", features = ["ead-authz"] }
7+
lakers = { package = "lakers", path = "../../lib", features = ["ead-authz"] }
88
lakers-crypto = { path = "../../crypto/", features = [ "hacspec" ] }
99
hexlit = "0.5.3"
1010
coap = { version = "0.13" }

examples/coap/src/bin/coapclient.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use coap::CoAPClient;
22
use coap_lite::ResponseType;
3-
use edhoc_rs::*;
43
use hexlit::hex;
4+
use lakers::*;
55
use std::time::Duration;
66

77
const _ID_CRED_I: &[u8] = &hex!("a104412b");

examples/coap/src/bin/coapserver-coaphandler.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use edhoc_rs::*;
21
use hexlit::hex;
2+
use lakers::*;
33
use lakers_crypto::Crypto;
44

55
use embedded_nal::UdpFullStack;

examples/coap/src/bin/coapserver.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use coap_lite::{CoapRequest, Packet, ResponseType};
2-
use edhoc_rs::*;
32
use hexlit::hex;
3+
use lakers::*;
44
use std::net::UdpSocket;
55

66
const ID_CRED_I: &[u8] = &hex!("a104412b");

examples/edhoc-rs-cc2538/Cargo.toml examples/lakers-cc2538/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ version = "0.1.0"
44
edition = "2021"
55
authors = ["Mališa Vučinić <malisa.vucinic@inria.fr>"]
66
license.workspace = true
7-
description = "edhoc-rs example on CC2538 SoC"
7+
description = "lakers example on CC2538 SoC"
88

99
[dependencies]
10-
edhoc-rs = { package = "lakers", path = "../../lib", default-features = false }
10+
lakers = { package = "lakers", path = "../../lib", default-features = false }
1111
lakers-crypto = { path = "../../crypto", default-features = false }
1212
# depend on an allocator
1313
embedded-alloc = "0.5.0"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

examples/edhoc-rs-cc2538/src/main.rs examples/lakers-cc2538/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ use cc2538_hal::crypto::aes_engine::keys::{AesKey, AesKeySize, AesKeys};
1616
use cc2538_hal::{crypto::*, sys_ctrl::*};
1717
use cc2538_pac as pac;
1818

19-
use edhoc_rs::{EDHOCError, EdhocInitiator, EdhocResponder, EdhocState};
2019
use hexlit::hex;
20+
use lakers::{EDHOCError, EdhocInitiator, EdhocResponder, EdhocState};
2121

2222
extern crate alloc;
2323

examples/edhoc-rs-no_std/Cargo.toml examples/lakers-no_std/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
2-
name = "edhoc-rs-no_std"
2+
name = "lakers-no_std"
33
authors = ["Kaspar Schleiser <kaspar@schleiser.de>"]
44
version = "0.1.0"
55
edition = "2021"
66

77
[dependencies]
8-
edhoc-rs = { package = "lakers", path = "../../lib", default-features = false }
8+
lakers = { package = "lakers", path = "../../lib", default-features = false }
99
lakers-crypto = { path = "../../crypto", default-features = false }
1010
hexlit = "0.5.3"
1111

@@ -25,5 +25,5 @@ default = [ "rtt", "crypto-cryptocell310", "ead-none" ]
2525
rtt = [ ]
2626
crypto-psa = [ "lakers-crypto/psa-baremetal" ]
2727
crypto-cryptocell310 = [ "lakers-crypto/cryptocell310" ]
28-
ead-none = [ "edhoc-rs/ead-none" ]
29-
ead-authz = [ "edhoc-rs/ead-authz" ]
28+
ead-none = [ "lakers/ead-none" ]
29+
ead-authz = [ "lakers/ead-authz" ]
File renamed without changes.

examples/edhoc-rs-no_std/README.md examples/lakers-no_std/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Introduction
22

33
This folder contains a bare metal (no_std) application for Cortex-M, intended
4-
to be used to test edhoc-rs on no_std targets.
4+
to be used to test lakers on no_std targets.
55

66
It's configured to work on the lm3s6965evb (Cortex-M3) board, which happens to
77
be supported by QEMU's system emulation.
File renamed without changes.
File renamed without changes.
File renamed without changes.

examples/edhoc-rs-no_std/src/main.rs examples/lakers-no_std/src/main.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use panic_semihosting as _;
1313
#[cfg(feature = "rtt")]
1414
use rtt_target::{rprintln as println, rtt_init_print};
1515

16-
use edhoc_rs::*;
16+
use lakers::*;
1717
use lakers_crypto::{default_crypto, CryptoTrait};
1818

1919
extern crate alloc;
@@ -52,12 +52,12 @@ fn main() -> ! {
5252
}
5353

5454
// testing output
55-
println!("Hello, edhoc-rs!");
55+
println!("Hello, lakers!");
5656

5757
// testing asserts
5858
assert!(1 == 1);
5959

60-
// edhoc-rs test code
60+
// lakers test code
6161
use hexlit::hex;
6262

6363
const _ID_CRED_I: &[u8] = &hex!("a104412b");

lakers-c/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ readme.workspace = true
99
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1010

1111
[dependencies]
12-
edhoc-rs = { package = "lakers", path = "../lib", default-features = false }
12+
lakers = { package = "lakers", path = "../lib", default-features = false }
1313
lakers-crypto = { path = "../crypto", default-features = false }
1414
hexlit = "0.5.3"
1515

@@ -26,8 +26,8 @@ crypto-rustcrypto = [ "lakers-crypto/rustcrypto", "critical-section" ]
2626
crypto-psa = [ "lakers-crypto/psa", "critical-section" ]
2727
crypto-psa-baremetal = [ "lakers-crypto/psa-baremetal" ]
2828
crypto-cryptocell310 = [ "lakers-crypto/cryptocell310" ]
29-
ead-none = [ "edhoc-rs/ead-none" ]
30-
ead-authz = [ "edhoc-rs/ead-authz" ]
29+
ead-none = [ "lakers/ead-none" ]
30+
ead-authz = [ "lakers/ead-authz" ]
3131

3232
[lib]
3333
crate-type = ["staticlib"]

lakers-c/src/initiator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use core::slice;
22

3-
use edhoc_rs::*;
3+
use lakers::*;
44
use lakers_crypto::{default_crypto, CryptoTrait};
55

66
use crate::*;

lakers-c/src/lib.rs

+3-7
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
///
77
/// Example command to compile this module for the nRF52840:
88
/// cargo build --target='thumbv7em-none-eabihf' --no-default-features --features="crypto-cryptocell310"
9-
use edhoc_rs::*;
9+
use lakers::*;
1010
use lakers_crypto::{default_crypto, CryptoTrait};
1111

1212
pub mod ead_authz;
@@ -115,12 +115,8 @@ pub extern "C" fn p256_generate_key_pair_from_c(out_private_key: *mut u8, out_pu
115115
core::ptr::copy_nonoverlapping(
116116
private_key.as_ptr(),
117117
out_private_key,
118-
edhoc_rs::P256_ELEM_LEN,
119-
);
120-
core::ptr::copy_nonoverlapping(
121-
public_key.as_ptr(),
122-
out_public_key,
123-
edhoc_rs::P256_ELEM_LEN,
118+
lakers::P256_ELEM_LEN,
124119
);
120+
core::ptr::copy_nonoverlapping(public_key.as_ptr(), out_public_key, lakers::P256_ELEM_LEN);
125121
}
126122
}

shared/src/crypto.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
use super::*;
44

5-
/// Interface between the edhoc-rs crate and any implementations of the required crypto primitives.
5+
/// Interface between the lakers crate and any implementations of the required crypto primitives.
66
///
77
/// Sending cryptographic operations through a trait gives the library the flexibility to use
88
/// hardware acceleration on microcontrollers, implementations that facilitate hacspec/hax

0 commit comments

Comments
 (0)