1.. zephyr:code-sample:: crypto 2 :name: Crypto 3 :relevant-api: crypto 4 5 Use the crypto APIs to perform various encryption/decryption operations. 6 7Overview 8******** 9An example to illustrate the usage of :ref:`crypto APIs <crypto_api>`. 10 11Building and Running 12******************** 13 14This project outputs to the console. It can be built and executed 15on QEMU as follows: 16 17.. zephyr-app-commands:: 18 :zephyr-app: samples/drivers/crypto 19 :host-os: unix 20 :board: qemu_x86 21 :goals: run 22 :compact: 23 24Sample Output 25============= 26 27.. code-block:: console 28 29 [general] [INF] main: Encryption Sample 30 31 [general] [INF] cbc_mode: CBC Mode 32 33 [general] [INF] cbc_mode: cbc mode ENCRYPT - Match 34 35 [general] [INF] cbc_mode: cbc mode DECRYPT - Match 36 37 [general] [INF] ctr_mode: CTR Mode 38 39 [general] [INF] ctr_mode: ctr mode ENCRYPT - Match 40 41 [general] [INF] ctr_mode: ctr mode DECRYPT - Match 42 43 [general] [INF] ccm_mode: CCM Mode 44 45 [general] [INF] ccm_mode: CCM mode ENCRYPT - Match 46 47 [general] [INF] ccm_mode: CCM mode DECRYPT - Match 48 49Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. 50