-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: added a check to handle self symmetric shared #1072
base: trunk
Are you sure you want to change the base?
Conversation
conclusion: to fix the issue I need to use at_chops to do RSA encryption because it's trying to use the private symmetric key to decrypt an AES key. If there's any place where at_chops is used so I can see an example it would be very helpful. |
See here to understand what happens when, as The code which handles this is in shared_key_decryption.dart, and part of that code handles the fetching of the symmetric key, decoding from base64, and decrypting using at_chops and the 'receiving' atSign's private key |
Ahhh, okay got it. I did some work on self_key_decryption first since keys like "shared_key.bob@alice" I think fall under self keys. Let me know if that's incorrect and I can just revert changes. I'll do shared_key_decryption when I get home. |
@@ -19,7 +20,16 @@ class SelfKeyDecryption implements AtKeyDecryption { | |||
intent: Intent.decryptData, | |||
exceptionScenario: ExceptionScenario.decryptionFailed); | |||
} | |||
|
|||
if (atKey.key == "shared_key") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The copy alice will create for themselves of a shared key they cut for bob will be shared_key.bob@alice
. Will this test work? What happens when you use this branch with your REPL?
@@ -19,7 +20,16 @@ class SelfKeyDecryption implements AtKeyDecryption { | |||
intent: Intent.decryptData, | |||
exceptionScenario: ExceptionScenario.decryptionFailed); | |||
} | |||
|
|||
if (atKey.key == "shared_key") { | |||
if (atKey.sharedWith != _atClient.getCurrentAtSign()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sharedWith is not set - when we create shared_key.bob@alice
- again, what happens when you run this branch with your REPL? Do you get the desired outcomes?
|
Please add unit tests which verify each case |
This reverts commit a3ae63e.
- What I did
I fixed bug with AtClient.get and shared symmetric keys #1071
- How I did it
Added symmetric shared key specific exceptions and also made sure they used proper encryption type on the keys.
- How to verify it
A made a test in decryption_service_test, I'm not sure if I did it right or if it even ran in the suite.
- Description for the changelog
Fixed bug with AtClient.get and shared symmetric keys