google / google/webcrypto.dart
Ensure CBS is empty after importing keys
Open
bug
- Dominant language
- Dart
- Stars
- 116
- Forks
- 110
- Avg merge
- 6d 8h
- Merged PRs (30d)
- 9
Description
Whenever we create a CBS object, it's usually because we're feeding some data into BoringCrypto. If all the data is not read, this usually indicates invalid data. If importing a key doesn't consume all the bytes supplied in the key, we should probably reject it.
This needs test cases to ensure compatibility with web implementations.
Look code referencing`Scope.createCBS` those places probably have to check that CBS is empty after it's been processed.
This requires testing of invalid key bytes, so probably blocked by https://github.com/google/webcrypto.dart/issues/55
Contributor guide
Assessment
This issue has not been assessed yet.