zephyr/samples/drivers/crypto
Leandro Pereira 2a98e7cfb4 samples: drivers: crypto: Print correct buffer comparison on failure
When testing whether the CTR mode decrypted the payload properly, a
comparison of `decrypt.out_buf` with the known plain text `plaintext`
is performed, but the buffer comparison that is printed uses
`plaintext` and `encrypt.out_buf` instead.

Coverity-CID: 181847

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-02-17 09:15:10 -05:00
..
src samples: drivers: crypto: Print correct buffer comparison on failure 2018-02-17 09:15:10 -05:00
CMakeLists.txt Introduce cmake-based rewrite of KBuild 2017-11-08 20:00:22 -05:00
prj.conf samples: crypto: remove DEBUG/ASSERT from prj.conf 2018-01-25 04:45:35 +05:30
prj_mtls_shim.conf samples: crypto: remove DEBUG/ASSERT from prj.conf 2018-01-25 04:45:35 +05:30
README.txt kernel: remove remaining microkernel references 2017-04-10 20:21:05 +00:00
sample.yaml samples: use console harness for some samples 2018-01-25 04:45:35 +05:30

Title: crypto

Description:

An example to illustrate the usage of crypto APIs.

--------------------------------------------------------------------------------

Building and Running Project:

This project outputs to the console.  It can be built and executed
on QEMU as follows:

    make run

--------------------------------------------------------------------------------

Troubleshooting:

Problems caused by outdated project information can be addressed by
issuing one of the following commands then rebuilding the project:

    make clean          # discard results of previous builds
                        # but keep existing configuration info
or
    make pristine       # discard results of previous builds
                        # and restore pre-defined configuration info

--------------------------------------------------------------------------------

Sample Output:

[general] [INF] main: Encryption Sample

[general] [INF] cbc_mode: CBC Mode

[general] [INF] cbc_mode: cbc mode ENCRYPT - Match

[general] [INF] cbc_mode: cbc mode DECRYPT - Match

[general] [INF] ctr_mode: CTR Mode

[general] [INF] ctr_mode: ctr mode ENCRYPT - Match

[general] [INF] ctr_mode: ctr mode DECRYPT - Match

[general] [INF] ccm_mode: CCM Mode

[general] [INF] ccm_mode: CCM mode ENCRYPT - Match

[general] [INF] ccm_mode: CCM mode DECRYPT - Match