0

When using asymmetric encryption, signing and encryption are the same, but opposite, operations.

Say I have my drive encrypted with asymmetric encryption. If I save a signed file to that drive, using the same key, would that file be in the clear on the physical drive?

I tried some googling, but I only found general explanations about symmetric vs. asymmetric encryption.

2
  • 1
    "... signing and encryption are the same, but opposite, operations." - No. Encryption and Decryption are opposite operations, not Encryption and Signing. Apr 19 at 9:25
  • Ah, I see. that answers my question
    – Jonathan
    Apr 19 at 9:26

1 Answer 1

1

When using asymmetric encryption, signing and encryption are the same, but opposite, operations.

This is just false. For one specific asymmetric algorithm, RSA, the mathematical "primitive" is the same for encryption and signing, but that still doesn't mean the operations are the same, much less opposite. For one thing, encryption involves padding (and decryption the removal of the padding), whereas both signing and verifying involve hashing (and the message is completely unchanged by the process). For another, while it's true that both RSA decryption and signing involve exponentiating with the private key modulus, the value being exponentiated is different in each case. Again, this is specific (and, so far as I know, unique) to RSA and doesn't apply to other asymmetric algorithms; some work completely differently.

Finally, the concept that running some data through a decryption algorithm and then putting it inside a longer stream of encrypted data (even encrypted with the same key) would reveal the plaintext again is not how modern ciphers work, and would be a significant cryptographic weakness. Even if the "pre-decrypted" data were inserted into the data-to-be-encrypted at exactly an n-block offset (that is, it started on a block boundary, for a block cipher), the block cipher would have to be running in ECB mode - which is "you should never use this" levels of dangerously insecure - and the pre-decrypted data would need to be an exact multiple of the block length (or have no data after it in the encrypted message). For any real-world cryptosystem designed by competent people, this won't happen.

Furthermore, it is impractical to encrypt a file, much less a drive, with asymmetric encryption. Asymmetric ciphers are extremely slow, and are not made for use on sequential blocks of data. Instead, all major "asymmetric encryption" is actually performed using a symmetric cipher (such as AES or ChaCha20) with a random and unique symmetric key, and only that symmetric key is encrypted using the asymmetric cipher. This is called a hybrid cryptosystem. The symmetric key is automatically generated randomly for every new encryption. Thus, even if two "messages" (such as a file and your drive) are both encrypted using the same asymmetric key, the actual data would be encrypted using two different symmetric keys.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.