Comments (4)
(See below) Please note that I haven't yet checked how OpenSSL handles this. I wouldn't be too surprised if they do the same, and in that case you are bug compatible with them.
The software we've seen so far that does the correct conversion happens to be running on Windows.
from mbed-crypto.
Internal Jira reference: https://jira.arm.com/browse/IOTCRYPT-1032
from mbed-crypto.
Apparently OpenSSL doesn't have this bug if used correctly: It has functions like OPENSSL_asc2uni()
which works just like your code but it also has OPENSSL_utf82uni()
and as long as the latter is used, caller is bug free in this aspect. The UTF-8 functions were added in November 2015.
Edit:
https://mta.openssl.org/pipermail/openssl-dev/2016-August/008371.html
from mbed-crypto.
Mbed TLS mostly focuses on embedded devices where code size is at a premium and non-ASCII character encodings are rarely used, and we try to avoid breaking backward compatibility. So I favor:
- Documenting that
pkcs12_pbe_derive_key_iv
expects its argumentpwd
to be encoded in latin1. - Adding a new function that supports Unicode. I don't know what the argument type should be:
wchar_t
? (Would create a dependency on that type, which freestanding C implementations might not have.)uint16_t
? (Would this be useful in practice?) And should it be documented as taking a BMPString per RFC 7292 or UTF-16 (allowing characters outside the basic plane)?
from mbed-crypto.
Related Issues (20)
- Writing code that works for both Mbed Crypto 1.1 and 2.0 APIs HOT 5
- Incorrect sizes for secp224k1 keys through the PSA API HOT 4
- psa_import_key() documentation improvements HOT 1
- Public / private distinction in crypto.h, crypto_values.h, crypto_struct.h HOT 2
- crypto_struct.h and such not self-contained HOT 2
- Plan to address RSA attacks of eprint.iacr.org/2020/055? HOT 12
- Negative testing for unsupported algorithms HOT 4
- Reducing stack memory consumption HOT 2
- Doxygen misses "end group" markup (\}) in multiple .h files HOT 7
- Recent doxygen throws warnings "return value XXX of xxx has multiple documentation sections" HOT 4
- Doxygen 1.8.17 throws warnings about our doxyfile HOT 3
- Some algorithm identifiers are not correctly encoded HOT 2
- Mbed Crypto to drop requirement for a CLA HOT 1
- Merging Mbed Crypto back into Mbed TLS HOT 5
- 30% of PSA Cryptographic API tests are failed HOT 6
- Some of the Crypto APIs of PSA Crypto 1.0 Beta-3 are unimplemented mbedcrypto-3.0.1 HOT 2
- mbedcrypto-3.0.1 doesn't have the support for persistent keys HOT 2
- i386 builds fail with GCC7 HOT 2
- Don't use FindPythonInterp HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mbed-crypto.