This should fix several long-standing issues with call encryption.
Previously the Cipher object would be created and maintained with the same keys throughout the duration of the session, it also did not support the new Epoch flag which specifies which calldata public key was being used to encrypt the request (requiring the server to try several).
This would cause problems, like when you leave a dApp open for a while your transactions would fail with 'tag verification failed'.
This introduces several changes:
New Cipher instance is used for every request
calldata public key is cached (5 minutes by default)
The epoch parameter is passed in the encryption envelope
Debug scripts/proxy.js shows epoch status too.
This means that leaving dApps open for prolonged periods of time will be OK.
Follow-up notes:
Gas tests in contracts/ had a small rewrite, because of the variance they were longer a sufficient test of what they were supposed to do check for! They've been made relative instead.
This should fix several long-standing issues with call encryption.
Previously the
Cipher
object would be created and maintained with the same keys throughout the duration of the session, it also did not support the newEpoch
flag which specifies which calldata public key was being used to encrypt the request (requiring the server to try several).This would cause problems, like when you leave a dApp open for a while your transactions would fail with 'tag verification failed'.
This introduces several changes:
epoch
parameter is passed in the encryption envelopescripts/proxy.js
shows epoch status too.This means that leaving dApps open for prolonged periods of time will be OK.
Follow-up notes:
contracts/
had a small rewrite, because of the variance they were longer a sufficient test of what they were supposed to do check for! They've been made relative instead.