Daniel Huigens
a7fce27424
Safari 8 compatibility
2018-04-30 16:58:37 +02:00
Daniel Huigens
cc1f7a4765
Lower chunk_size_byte to 12 (256KiB)
...
- In anticipation of streaming decryption
- Firefox 34 does not support chunk_size_byte > 24
256KiB is almost as fast as no chunks (although both of those can be up to
~1.5x slower than optimally using threads for very large message sizes).
The optimal chunk size would be something like:
max(data.length / navigator.hardwareConcurrency, 128KiB)
But we don't do so currently because
- We don't know the hardwareConcurrency of the decrypting machine
- Smaller chunk sizes are better for streaming decryption
2018-04-30 16:58:36 +02:00
Daniel Huigens
550b758d57
Fall back to asm for CTR and CBC in old Safari
2018-04-30 16:58:35 +02:00
Daniel Huigens
b8191388cd
Bump "old Chrome" version from 38 to 41
2018-04-30 16:58:34 +02:00
Daniel Huigens
48cbb97d19
Bump Sauce Labs timeout
2018-04-30 16:58:33 +02:00
Daniel Huigens
7ce3f5521f
Set default draft version to 4
2018-04-30 15:55:38 +02:00
Daniel Huigens
04651e359a
Rename enums.aead.gcm to experimental_gcm
...
So that (1) if the spec ever defines GCM differently than we do, we have a
clean upgrade path and (2) it makes it clear that it's experimental.
2018-04-30 15:55:37 +02:00
Daniel Huigens
bbf71d149b
Deduplicate OCB encrypt / decrypt
2018-04-30 15:55:37 +02:00
Daniel Huigens
e8adeef278
Implement Issuer Fingerprint subpacket
2018-04-30 15:55:37 +02:00
Daniel Huigens
310d8dd9b9
Fix V5 key fingerprint in ECDH parameters
2018-04-30 15:55:36 +02:00
Daniel Huigens
be62b0cf65
Add algorithm IDs for AEDH and AEDSA
2018-04-30 15:55:36 +02:00
Daniel Huigens
0376f49e01
Deduplicate getPreferredSymAlgo / getPreferredAEADAlgo
2018-04-30 15:55:35 +02:00
Daniel Huigens
4568d080d5
Fix decryption with multiple chunks
2018-04-30 15:55:34 +02:00
Daniel Huigens
485cb17e95
Deduplicate SymEncryptedAEADProtected encrypt / decrypt
2018-04-30 15:55:34 +02:00
Daniel Huigens
343c64eca0
Add tests for signing and verifying messages with trailing spaces
2018-04-30 15:55:33 +02:00
Daniel Huigens
ebeedd3443
Fix removing whitespace from the last line of cleartext signed messages
...
Also, move normalizing line endings and removing whitespace to util functions
2018-04-30 15:55:33 +02:00
Daniel Huigens
4e204d7331
Update AEAD instructions in README
2018-04-30 15:55:32 +02:00
Daniel Huigens
d7efead337
Update Web Worker selection logic for AEAD
2018-04-30 15:55:32 +02:00
Daniel Huigens
e061df113c
Implement GCM mode in the new draft
...
Also, implement additional data for GCM
2018-04-30 15:55:31 +02:00
Daniel Huigens
d5a7cb3037
Constant-time double() in OCB
2018-04-27 14:06:20 +02:00
Daniel Huigens
69762f95de
Code style
2018-04-27 14:06:20 +02:00
Daniel Huigens
51d7860622
Native CMAC
2018-04-27 14:06:19 +02:00
Daniel Huigens
6f2abdc2cf
Implement MIME message type (Literal Data Packet format 'm')
2018-04-27 14:06:19 +02:00
Daniel Huigens
3b81088aaf
Decouple signature type from data packet type
...
Instead of creating a text signature for text packets and a binary signature for
binary packets, we determine the signature type based on whether a String or
Uint8Array was originally passed. This is useful for the new MIME data packet
type (implemented in the next commit) which you can pass in either format.
This also partly reverts a22c9e4
. Instead of canonicalizing the literal data
packet, we canonicalize the data when signing. This fixes a hypothetical case
where an uncanonicalized text packet has both a text and a binary signature.
This also partly reverts c28f7ad
. GPG does not strip trailing whitespace when
creating text signatures of literal data packets.
2018-04-27 14:06:19 +02:00
Daniel Huigens
2f849063f9
Allow reusing EAX/OCB instances with the same key
...
This is useful for chunked encryption in draft04
2018-04-27 14:06:19 +02:00
Daniel Huigens
e24b46192d
Only AEAD-protect when target keys support it
2018-04-27 14:06:18 +02:00
Daniel Huigens
e9a360019c
Update table of supported native ECC curves
2018-04-27 14:06:18 +02:00
Daniel Huigens
e44fbbccab
Add more OCB tests
2018-04-27 14:06:18 +02:00
Daniel Huigens
28dbbadcff
Add config.aead_protect_version option
2018-04-27 14:06:17 +02:00
Daniel Huigens
d5d4c97228
Fix config.use_native
2018-04-27 14:06:17 +02:00
Daniel Huigens
53d6f20b72
Reduce allocations in OCB mode
2018-04-27 14:06:17 +02:00
Daniel Huigens
997ec1c8db
Add AEAD feature flags
2018-04-27 14:06:17 +02:00
Daniel Huigens
f225f994ec
Add AEAD-OCB test vector
2018-04-27 14:06:16 +02:00
Daniel Huigens
5f97a8c937
Implement preferred AEAD algorithms
2018-04-27 14:06:16 +02:00
Daniel Huigens
93f75f398f
Reuse CMAC in EAX mode
2018-04-27 14:06:16 +02:00
Daniel Huigens
627a6ef46e
Only calculate AES key schedules once in cipher/aes.js
2018-04-27 14:06:15 +02:00
Daniel Huigens
c6ba83c4a3
Allow configuring openpgp in unit tests using query params (e.g. ?debug=true&use_native=false)
2018-04-27 14:06:15 +02:00
Daniel Huigens
ba2b761da4
Implement OCB mode
2018-04-27 14:06:15 +02:00
Daniel Huigens
cc4cc38fe7
Add util.print_debug_hexarray_dump
2018-04-27 14:06:15 +02:00
Daniel Huigens
f40489aa43
Implement getLeftNBits, shiftLeft and shiftRight for Uint8Arrays
2018-04-27 14:06:14 +02:00
Daniel Huigens
5f891d28d6
Switch cipher/aes.js to Uint8Arrays
2018-04-27 14:06:14 +02:00
Daniel Huigens
c2f898279b
Implement version 5 Secret-Key Packet Format
2018-04-27 14:06:14 +02:00
Daniel Huigens
5d43b44e50
Log swallowed errors in debug mode
2018-04-27 14:06:14 +02:00
Daniel Huigens
7c3bbe9278
Don't auto-scroll unit tests if you scrolled up
2018-04-27 14:06:13 +02:00
Daniel Huigens
17ad654d60
Implement version 5 Symmetric-Key Encrypted Session Key packet
2018-04-27 14:06:13 +02:00
Daniel Huigens
7b3f51c0d4
Implement AEAD Encrypted Data Packet
2018-04-25 20:12:10 +02:00
Daniel Huigens
85a1b9859b
Implement EAX mode
2018-04-25 20:12:10 +02:00
Sanjana Rajan
2376c8329c
Merge pull request #692 from twiss/fix-dash-escaping
...
Fix dash-escaping the first line of cleartext signed messages
2018-04-25 11:03:41 -07:00
Daniel Huigens
c63ed980a1
Fix dash-escaping the first line of cleartext signed messages
2018-04-25 19:46:43 +02:00
Sanjana Rajan
ce973be6ba
Merge pull request #685 from twiss/workers-random
...
Use crypto.getRandomValues in Workers
2018-04-23 12:42:49 -07:00