Encrypted CrowdTwist ID

Overview

The CrowdTwist ID is a unique identifier for a member of the CrowdTwist platform. To ensure that a user does not manipulate a value while clicking a link, CrowdTwist generates an encrypted value that can only be decrypted with a preshared Data Encryption Key.

The decrypted value includes the members' CrowdTwist ID and a timestamp. The timestamp can be used to validate expiration, ensuring that the member has not cached the value or used it after its expiration (determined by the receiving system).

Where You Can Find The ID

The Encrypted CrowdTwist ID is available for use with the Verify your Account email, hidden in the Account Overview Two widget and within the Activity List widget as part of a link. This can be used to link a member to an external site while securely preserving the member identifier.

Decryption Process

The decryption process is four steps. To complete this, you'll need your instance's Data Encryption Key. If you do not have this, please contact your Oracle CrowdTwist representative. With this key and the encrypted value, you'll be able to parse the value programmatically.

Step 1: URL Decode the Value

To start, the URL decodes the value.

  • Step 1.1: Original value

    Result:

    NUHj658C7FtG14xrMm3EQw%3D%3D%3AXTax9whbftijMDbKpwXVnq%2F83c2hAYd5C01jqcZr6GUZai%2B%2FB1mvGdppsc%2BkJrnV
  • Step 1.2: URL Decoded the value

    Result:

    NUHj658C7FtG14xrMm3EQw==:XTax9whbftijMDbKpwXVnq/83c2hAYd5C01jqcZr6GUZai+/B1mvGdppsc+kJrnV

    Sample tool:

Step 2: Split the string

The string comprises two sections, the Initialization Vector and the Data value. These are separated by a colon, with the Initialization Vector before the colon and the data after.

  • Step 2.1: Original value

    Result:

    NUHj658C7FtG14xrMm3EQw==:XTax9whbftijMDbKpwXVnq/83c2hAYd5C01jqcZr6GUZai+/B1mvGdppsc+kJrnV
  • Step 2.2: Split on the colon

    Result Initialization Vector:

    NUHj658C7FtG14xrMm3EQw==

    Result Data:

    XTax9whbftijMDbKpwXVnq/83c2hAYd5C01jqcZr6GUZai+/B1mvGdppsc+kJrnV

Step 3: Convert to HEX

The Initialization Vector and Data must be converted from Base64 ASCII to HEX. The Encryption key must be converted from text to HEX.

  • Step 3.1: Original values:

    Initialization Vector:

    NUHj658C7FtG14xrMm3EQw==

    Data:

    XTax9whbftijMDbKpwXVnq/83c2hAYd5C01jqcZr6GUZai+/B1mvGdppsc+kJrnV

    Encryption key:

    JvEWGNLzZx3nvM35edcVzGlN2Uo0YTys

  • Step 3.2: Convert to HEX

    Initialization Vector:

    35 41 e3 eb 9f 02 ec 5b 46 d7 8c 6b 32 6d c4 43

    Data:

    5d 36 b1 f7 08 5b 7e d8 a3 30 36 ca a7 05 d5 9e af fc dd cd a1 01 87 79 0b 4d 63 a9 c6 6b e8 65 19 6a 2f bf 07 59 af 19 da 69 b1 cf a4 26 b9 d5

    Encryption key:

    4a 76 45 57 47 4e 4c 7a 5a 78 33 6e 76 4d 33 35 65 64 63 56 7a 47 6c 4e 32 55 6f 30 59 54 79 73

    Sample tool:

Step 4: AES-256 Decrypt

Using the three HEX values, you can now decrypt the value, using CBC (Cipher Block Chaining).

  • Step 4.1: Original values:

    Initialization Vector:

    35 41 e3 eb 9f 02 ec 5b 46 d7 8c 6b 32 6d c4 43

    Data:

    5d 36 b1 f7 08 5b 7e d8 a3 30 36 ca a7 05 d5 9e af fc dd cd a1 01 87 79 0b 4d 63 a9 c6 6b e8 65 19 6a 2f bf 07 59 af 19 da 69 b1 cf a4 26 b9 d5

    Encryption key:

    4a 76 45 57 47 4e 4c 7a 5a 78 33 6e 76 4d 33 35 65 64 63 56 7a 47 6c 4e 32 55 6f 30 59 54 79 73

  • Step 4.2: Decrypt

    Result:

    userId=48073794&timestamp=1555685456

    Sample tool: