Encrypt AES: Don't assume nonce is 8 bytes

For AES encryption, the client can optionally pass a nonce to use as the
beginning of the IV.  The code assumed the nonce was exactly eight
bytes, so it would always append eight zeros to form the 16-byte nonce.

The fix is to only append as many zeros are necessary for a 16-byte IV.
1 file changed
tree: 9ec0f609239f5d4ef8cadcb5f8c56c3c8e42beea
  1. errors/
  2. flash/
  3. image/
  4. manifest/
  5. mfg/
  6. sec/
  7. .gitignore
  8. .travis.yml
  9. go.mod
  10. go.sum
  11. LICENSE
  12. NOTICE
  13. README.md
README.md

Mynewt Artifact

Apache Mynewt Artifact is a Go library that parses, manipulates, validates, and outputs Mynewt artifacts. Supported artifacts are:

  • Images
  • Image manifests
  • Manufacturing images (mfgimages)
  • Manufacturing manifests