Skip to content

decrypt handling entire EncryptedAssertion #30

Description

@mitakuye

Documentation says to pass "EncryptedData" to decrypt. However, you actually need the entire "EncryptedAssertion" , so that "EncryptedKey" can be referenced from "EncryptedData". Existing code, actually, handles this right now (sort of). I passed in "EncryptedAssertion", and decrypt function (via decryptKeyInfo) did successfully handle finding the "keyEncryptionAlgorighm"; but failed in decryptKeyInfoWithScheme with "Error: Encrypted message length is invalid" from rsa libs. So, I think the documentation needs to be updated to denote entire "EncryptedAssertion" and possibly run through to make sure it's still working as expected when entire "EncryptedAssertion" is passed in.

Attachment in the ref below has sample EncryptedAssertion with ref to "EncryptedKey" from "EncryptedData".
#Ref tngan/samlify#85

Activity

  1. mitakuye commented on Jun 22, 2017

    @mitakuye
    Author

    To continue from above wrt to the ""Error: Encrypted message length is invalid" error....I think "decryptKeyInfo" logic needs to be tweaked, in order to handle an Encrypted Assertion when URI used to EncryptionKey. Currently, it is trying to decrypt the "EncryptedData" (aes) with the "EncryptedKey" cipher (rsa). I think rough logic should be:
    If EncryptedData RetrievalMethod is URI to the EncryptedKey -> then decrypt the EncryptedKey (to get Cipher Value) to use to Decrypt the EncryptedData.
    Else -> use existing logic

    Attaching sample Assertion with test cert/key

    auth0.zip

  2. added this to the v1.1.0 milestone on Feb 9, 2020
  3. modified the milestones: v1.1.0, v1.2.0 on Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions