

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: Cryptography Is About Encryption
incomplete
2: What Is Cryptography?
incomplete
3: Symmetric vs. Asymmetric
incomplete
4: Symmetric vs. Asymmetric
incomplete
5: Better Keys
incomplete
6: Cryptology, Cryptography and Cryptanalysis
incomplete
7: Single-Use Keys
incomplete
8: Single-Use Keys Review
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
In the context of password managers, cryptography is used to secure data at rest. Typically, a "vault" of passwords is safely stored so that only authorized parties can gain access.
Protecting files at rest, or more specifically, protecting files for oneself is usually accomplished via symmetric encryption, which means encryption and decryption use the same key.
Asymmetric encryption uses two keys, and we'll talk more about it later.
A developer at Passly was confused and committed a bug to our unit tests (luckily it was just the tests). They assumed that an asymmetric cipher was being used, but we're using a symmetric cipher.
Fix the bug. You should see decrypted messages in plaintext.
You'll need to alter the function signature of debugEncryptDecrypt(). Because this cipher is symmetric, only one key is needed. Look at the call to debugEncryptDecrypt in main_test.go to see how it should be used.