Tracking Variable Transformations and Validations in Symmetric Encryption/Decryption Flow #1134
Unanswered
MarianBaba
asked this question in
Q&A
Replies: 1 comment
-
Hey @MarianBaba, I haven't written this kind of validation yet, but it should be in theory closely related to the problem of statically computing type information in a (dynamic) programming language. Let's take a look at this from a type system perspective function PKE_ENC<T, K>(toEncrypt: T, publicKey: Public<K>): EncryptedPK<T, K>
function PKE_DEC<T, K>(toDecrypt: EncryptedPK<T, K>, privateKey: Private<K>): T
encrypted_key_a = PKE_ENC(symmetric_key_a) with pub_key_b // `encrypted_key_a` Typed as `EncryptedPK<symmetric_key_a, pub_key_b>`
decrypted_key_a = PKE_DEC(encrypted_key_a) with priv_key_b // `decrypted_key_a` Typed as `symmetric_key_a` (which is the goal) Note that there's a (but omitted) relationship between types Does that help you in any way? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I am working on a DSL for defining communication protocols. My DSL has some built-in functions, which users can call in their programs. Some of these functions include encryption and decryption. Right now, I'm focused on writing validation functions that can verify if a symmetric key is used correctly in the symmetric encryption and decryption process.
Here is an example of this process:
Now, here is the problem: I want my validation function to understand that
decrypted_key_a
refers to the same value assymmetric_key_a
and be able to give an error if an incorrect symmetric key is used when callingDEC()
. In other words, I want my validation function to keep track of the function invocation flow/communication flow that a variable goes through, and provide relevant errors.Do you have any idea how this can be done? Alternatively, can anyone point me to a compiler/validator that does something similar so I can understand the logic that goes behind this type of validation?
Beta Was this translation helpful? Give feedback.
All reactions