Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ccm #1

Merged
merged 270 commits into from
Jan 29, 2018
Merged

Ccm #1

merged 270 commits into from
Jan 29, 2018

Conversation

niklasad1
Copy link

@niklasad1 niklasad1 commented Jan 22, 2018

Pull Request Overview

Hi, @bbbert

I have implemented support for NRF5x for the new symmetric_encryption hil and I modified the AES tests because they required both CTR and CCM (NRF5x support only CTR)

Testing Strategy

The test was executed in the reset_handler on nRF52-DK similar to the imix test with the following outcome:

TOCK_DEBUG(0): src/main.rs:345: Initialization complete. Entering main loop
TOCK_DEBUG(1): /home/niado1/tock/capsules/src/test/aes.rs:150: OK! (Enc Ctr Src/Dst)
TOCK_DEBUG(2): /home/niado1/tock/capsules/src/test/aes.rs:150: OK! (Dec Ctr Src/Dst)

TODO or Help Wanted

  1. Check if I broke the initial tests (I can have look later also)

Have a look and let me know what to fix etc...
Rebased now!

Documentation Updated

  • Kernel: The relevant files in /docs have been updated or no updates are required.
  • Userland: The application README has been added, updated, or no updates are required.

Formatting

  • make formatall has been run.

adkinsjd and others added 30 commits October 15, 2017 16:10
Since this was refactored to use subscribes, just let the default
allow implementation handle things.
Using https://github.com/jameysharp/corrode, automatically convert the
old crt1.c to Rust. In contrast to tock#369, which sought to update this
file to newer Tock conventions, this is a blind translation, but should
hopefully unblock tock#367.
tools: build rustfmt with Tock Rust version
* ble_advertising: print progress

It's nice to see progress and most importantly to know that the chip
thinks it's advertising when running this example

* Print what BLE device name to look for
Wrong Driver Number!
It is too slow and is broken, plus we are running the same tests on mac, and
have no mac specific code.
Add nrf51 serialization driver for imix
niklasad1 and others added 19 commits January 23, 2018 15:51
Removed long ago!
- hil::symmetric_encryption
  - provide distinct traits for Ctr/CBC modes so we can be sure these
    hardware features exist at compile time
  - allow distinct src/dst encryption or in-place operation
- fix up sam4l::aes to match the new interface, and track input/output
  with the hardware properly
- add TakeCell.map_or_else()
- tests are in boards/imix/src/aes_test.rs, and may be run by adding
  this just before the call to `kernel::main()`:

    aes_test::run();

NOTE: this commit removes capsules::symmetric_encryption, the userspace
interface to AES.  Future work will have to patch that back onto the
modified HIL, and perhaps also provide a mux for userspace+kernel users.
These methods now have the same semantics as put/take for a TakeCell,
except that when the hardware is busy (between a call to crypt() and the
following invocation of crypt_done()), they have degenerate behavior:
put has no effect, and take returns None.
This changes the interface once more so that there is
no opportunity for confusion over the state of buffer
ownership.
* The CBC-test fails because it is not supported. I suggest to change
the test structure and the trait bounds accordingly
* Because the AES tests depended on trait bounds on both AES128Cbc and
AES128Ctr => both the traits needed to implemented
* Since NRF5x only support CTR ended up in test failed
* That's why I splitted up them (I have not verified that tests are
correct though)
* The test passed on NRF5x
@bbbert bbbert merged commit 616225e into bbbert:ccm Jan 29, 2018
@niklasad1 niklasad1 deleted the ccm branch January 29, 2018 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.