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

samples/drivers/crypto: CBC and CTR mode not supported #15177

Closed
cinlyooi-intel opened this issue Apr 4, 2019 · 1 comment
Closed

samples/drivers/crypto: CBC and CTR mode not supported #15177

cinlyooi-intel opened this issue Apr 4, 2019 · 1 comment
Labels
bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@cinlyooi-intel
Copy link
Contributor

Describe the bug
CBC and CTR mode not supported for test case sample.driver.crypto.mbedtls only. (It works for sample.driver.crypto.mbedtls.micro)

To Reproduce
Steps to reproduce the behavior:

  1. mkdir build; cd build
  2. cmake -DBOARD=nrf52_pca10040 # qemu_x86, qemu_nios2, qemu_arm, arduino_due, frdm_k64f, nrf51_pca10028, sam_e70_xplained, nrf52840_pca10056, altera_max10, quark_ss_c1000_devboard:x86, quark_ss_c1000_se_devboard:arc
  3. make
  4. make run

Screenshots or console output

****** delaying boot 1000ms (per build configuration) *****
***** Booting Zephyr OS v1.14.0-rc3-104-g4aa48833d812 (delayed boot 1000ms) *****
[00:00:01.011,840] <inf> main: Cipher Sample
[00:00:01.011,840] <inf> main: CBC Mode
[00:00:01.011,840] <err> mbedtls: Unsupported mode
[00:00:01.011,840] <inf> main: CTR Mode
[00:00:01.011,871] <err> mbedtls: Unsupported mode
[00:00:01.011,871] <inf> main: CCM Mode
[00:00:01.012,145] <inf> main: Output length (encryption): 31
[00:00:01.012,145] <inf> main: CCM mode ENCRYPT - Match
[00:00:01.012,451] <inf> main: Output length (decryption): 31
[00:00:01.012,451] <inf> main: CCM mode DECRYPT - Match

Environment (please complete the following information):

  • OS: fedora29
  • Toolchain zephyr
  • Commit SHA or Version used: 4aa4883
@cinlyooi-intel cinlyooi-intel added the bug The issue is a bug, or the PR is fixing a bug label Apr 4, 2019
@rljordan-zz rljordan-zz assigned ghost Apr 5, 2019
@rljordan-zz rljordan-zz added the priority: low Low impact/importance bug label Apr 5, 2019
@ghost
Copy link

ghost commented Apr 9, 2019

This appears to be the expected behavior. From crypto_mtls_shim.c:

        if (mode != CRYPTO_CIPHER_MODE_CCM) {
                LOG_ERR("Unsupported mode");
                return -EINVAL;
        }

In addition, the test case doesn't need to be modified because it's not failing: it doesn't look for successful crypto, just to see if it attempts the crypto. So I'm going to close this as a false alarm.

@ghost ghost closed this as completed Apr 9, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

2 participants