Create Rijndael Cipher

Creates a Rijndael Block Cipher encryption.

Command availability: IBM RPA SaaS and IBM RPA on premises

Description

Creates a Rijndael Block Cipher encryption using an initialization vector and an encryption mode. This is an alternative implementation of the AES encryption algorithm, which does not comply with FIPS standards.

Limitations

This command is unavailable if your environment has FIPS encryption enabled. This implementation of the algorithm does not comply with FIPS standards.

Use the Create AES Cipher (cipherAes) command instead.

Script syntax

IBM RPA's proprietary script language has a syntax similar to other programming languages. The script syntax defines the command's syntax in the script file. You can work with this syntax in IBM RPA Studio's Script mode.

cipherRijndael --key(String) --iv(String) --mode(Nullable<CipherMode>) (Boolean)=success (Cipher)=value

Input parameters

The following table displays the list of input parameters available in this command. In the table, you can see the parameter name when working in IBM RPA Studio's Script mode and its Designer mode equivalent label.

Designer mode label Script mode name Required Accepted variable types Description
Key key Required Text Key used in the creation of Rijndael encryption.
Initialization Vector iv Required Text Set of random characters used alongside with the Key to create the cipher. The initialization vector must contain exactly 16 characters.
Mode mode Required CipherMode Encryption mode used in its creation. For more information, see mode parameter options.

key parameter options

The key must be in the Rijndael encryption key standard, with keys having the size of either:

  • 16 characters corresponding to a 128-bit key.
  • 24 characters corresponding to a 192-bit key.
  • 32 characters corresponding to a 256-bit key.

mode parameter options

The following encryption modes are available:

Mode Description
Cipher Block Chaining (CBC) In this mode, the input to the cipher is divided into blocks of fixed size (usually 128 bits). The first block is XORed with an initialization vector (IV) to produce the first cipher block. This cipher block is then encrypted using the Rijndael algorithm and the resulting ciphertext is concatenated with the second plaintext block, which is also XORed with the previous ciphertext block to produce the second cipher block. This process is repeated for all remaining blocks in the input.

CBC provides confidentiality and integrity protection for the entire message by XORing consecutive blocks together. However, it requires an initialization vector (IV) to be used for the first block, which must be known to both the sender and receiver. If the IV is not carefully managed, it can lead to vulnerabilities such as padding oracle attacks.
Cipher Feedback (CFB) In this mode, the input to the cipher is divided into blocks of fixed size (usually 128 bits). A separate stream cipher is used to generate the keystream, which is then XORed with the input to produce the ciphertext. The keystream is generated using the previous ciphertext block as the input to the stream cipher.

CFB provides confidentiality and integrity protection for the entire message by using a separate stream cipher to generate the keystream. However, it does not provide any encryption for individual blocks, so it may be vulnerable to chosen-plaintext attacks.
Electronic CodeBook (ECB) In this mode, the input to the cipher is divided into blocks of fixed size (usually 128 bits). Each block is encrypted independently using the Rijndael algorithm.

ECB provides no encryption for individual blocks, making it vulnerable to many types of attacks, including substitution and exhaustive search attacks. However, it provides strong encryption for the entire message by using multiple rounds of encryption on different blocks.

Output parameters

Designer mode label Script mode name Accepted variable types Description
Success success Boolean Returns True, if the encryption is successfully created, or False otherwise.
Rijndael Cipher value Cipher Returns a variable containing the created Rijndael encryption.

Example

The command is used to create a Rijndael encryption. At the end, the script returns if the encryption was successfully created.

defVar --name cipher --type Cipher
defVar --name success --type Boolean
//Creates Rijndael encryption with the key="qasnksjkxl,smjdisuidjhpç" and iv="hjskl,mcnvhjshdg", in "CBC" encryption mode.
cipherRijndael --key "qasnksjkxl,smjdisuidjhpç" --iv "hjskl,mcnvhjshdg" --mode "CBC" success=success cipher=value
logMessage --message "${success}" --type "Info"
// Returns the following output:
// True