It was believed that the CAAM was able to create blobs from files of up to 1 MiB, because in some cases, encrypting and decrypting a large file would result in a file identical to the original one. In reality, the CAAM's job descriptors use 16 bits to store input/output sizes, so any size that takes up more than 16 bits either causes the operation to fail or makes the CAAM continue with the operation, but truncating the size to its 16 least significant bits. Encryption and decryption cycles that seem to work with large files are actually encrypting and decrypting part of the original file and storing the output in the memory address where the original file was stored, making it seem like the process was successful when it really isn't. It's also possible that, even if both operations work fine, the final decrypted file will differ from the original one because it contains the decrypted truncated blob plus whatever comes after it in memory. Fix the size limit, dynamically alter it during runtime depending on the operation and exit if the limit is surpassed to avoid including unrelated memory contents in the output. https://jira.digi.com/browse/DEL-7378 Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com> |
||
|---|---|---|
| apix-adc-example | ||
| apix-can-examples | ||
| apix-gpio-example | ||
| apix-i2c-example | ||
| apix-pm-examples | ||
| apix-pwm-example | ||
| apix-spi-example | ||
| apix-watchdog-example | ||
| awsiot-sample | ||
| ble-gatt-server-example | ||
| caam-blob-example | ||
| cryptochip-get-random | ||
| README.md | ||
| libdigiapix-examples.mk | ||
| samples-manifest.xml | ||
README.md
Digi Embedded Yocto examples
This repository contains application examples and sample code for the Digi Embedded Yocto distribution.
License
Copyright 2017, Digi International Inc.
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.