Skip to content

Commit

Permalink
Merge pull request openwsn-berkeley#199 from geonnave/update-readme-l…
Browse files Browse the repository at this point in the history
…akers-ead-ffi

Update README to reflect the current state of the library
  • Loading branch information
geonnave authored Feb 1, 2024
2 parents fa7a8e2 + ec714b1 commit a9a3cd0
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
# lakers: EDHOC implemented in Rust

[![Build and test](https://github.com/openwsn-berkeley/edhoc-rs/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/openwsn-berkeley/edhoc-rs/actions/workflows/build-and-test.yml)
[![Build and test](https://github.com/openwsn-berkeley/lakers/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/openwsn-berkeley/lakers/actions/workflows/build-and-test.yml)

A microcontroller-optimized implementation of EDHOC in Rust (`no_std`).
A microcontroller-optimized implementation of EDHOC in Rust (`no_std`, static memory).

Supports:
* Roles: Initiator, Responder (hacspec only)
`lakers` provides an implementation of the following drafts produced by the [Lightweight Authenticated Key Exchange (LAKE)](https://datatracker.ietf.org/wg/lake/about/) working group at the IETF:

- [Ephemeral Diffie-Hellman Over COSE (EDHOC)](https://datatracker.ietf.org/doc/draft-ietf-lake-edhoc/)
- [Lightweight Authorization using EDHOC](https://datatracker.ietf.org/doc/draft-ietf-lake-authz/)

It supports:
* Roles: Initiator, Responder
* Authentication mode: STAT-STAT
* Cipher suite: 2 (AES-CCM-16-64-128, SHA-256, 8, P-256, ES256, AES-CCM-16-64-128, SHA-256)

## Installation

1. Make sure you have Rust installed (see instructions in the [website](https://www.rust-lang.org/tools/install)).
1. Make sure you have [Rust](https://www.rust-lang.org/tools/install) installed.

2. Download, compile, and run the tests:
```
git clone git@github.com:openwsn-berkeley/edhoc-rs.git && cd edhoc-rs
git clone git@github.com:openwsn-berkeley/lakers.git && cd lakers
cargo build
cargo test
```

`edhoc_rs` can be compiled with different configurations depending on the enabled features. To learn what are the available features and how to select them for several configurations of build and test, check the [Github Actions file](./.github/workflows/rust.yml).
`lakers` can be compiled with different configurations depending on the enabled features. To learn what are the available features and how to select them for several configurations of build and test, check the [Github Actions file](./.github/workflows/rust.yml).

## Example: EDHOC over CoAP on native host

Expand Down Expand Up @@ -59,9 +64,12 @@ To build **and** flash to the board, replace the word `build` with `embed` in th
For example: `cargo embed --target="thumbv7em-none-eabihf" --no-default-features --features="crypto-psa, ead-none, rtt"`

## Directory structure
This library is structured as a Workspace, a feature from Cargo which makes it easy to manage more than one package / application in the same repository. Here are its the main folders:
This library is structured as a [cargo workspace](https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html).
Its main members are:

- `lib`: The main library for the EDHOC implementation.
- `examples`: Example applications that demonstrate how to use the EDHOC library. There are several subdirectories, each containing a different example application (e.g., coap, edhoc-rs-cc2538, edhoc-rs-no_std).
- `consts`: Defines constants and structs used throughout the project.
- `lib`: The main library providing the EDHOC implementation.
- `crypto`: Diferent cryptographic backends (e.g. psa, cryptocell310, hacspec).
- `ead`: Implementation of extensions to EDHOC via the External Authorization Data (EAD) field.
- `shared`: Defines shared structs and modules used throughout the workspace members.
- `lakers-c`: Provides a foreign function interface that enables using `lakers` from C code.
- `examples`: Example applications that demonstrate how to use the library.

0 comments on commit a9a3cd0

Please sign in to comment.