RC6 Decrypt

Category: Ciphers

Status: Registered and callable in the CyberChef 11.3.0 compatibility inventory.

Input / output: string → string

Background: https://wikipedia.org/wiki/RC6

What it does

RC6 is a symmetric key block cipher derived from RC5. It was designed by Ron Rivest, Matt Robshaw, Ray Sidney, and Yiqun Lisa Yin to meet the requirements of the AES competition, and was one of the five finalists. RC6 is parameterised as RC6-w/r/b where w is word size in bits (any multiple of 8 from 8-256), r is the number of rounds (1-255), and b is the key length in bytes. The standard AES submission uses w=32, r=20. Common word sizes: 8, 16, 32 (standard), 64, 128. IV: The Initialisation Vector should be 4*w/8 bytes (e.g. 16 bytes for w=32). If not entered, it will default to null bytes. Padding: In CBC and ECB mode, the PKCS#7 padding scheme is used.

Note

Status here means the operation name is implemented and callable. It does not by itself promise byte-for-byte parity for every upstream option. See Compatibility and current status for the verified scope and known boundaries.

Arguments and options

Arguments are positional. Keep their order when using bake() or Pipeline.then().

Index

Name

UI type

PyChef default

Accepted values / format

0

Key

toggleString

{'string': '', 'option': 'Hex'}

''

1

IV

toggleString

{'string': '', 'option': 'Hex'}

''

2

Mode

option

'CBC'

'CBC', 'CFB', 'OFB', 'CTR', 'ECB'

3

Input

option

'Hex'

'Hex', 'Raw'

4

Output

option

'Raw'

'Raw', 'Hex'

5

Padding

option

'PKCS5'

'PKCS5', 'NO', 'ZERO', 'RANDOM', 'BIT'

6

Word Size

number

32

A Python integer or floating-point value

7

Rounds

number

20

A Python integer or floating-point value

Recipe template

Important

This is a call template built from the documented defaults. Replace placeholder values such as empty keys, paths, patterns, or lookup data before running it.

from pychef import bake

input_value = "example"
args = [{'string': '', 'option': 'Hex'}, {'string': '', 'option': 'Hex'}, 'CBC', 'Hex', 'Raw', 'PKCS5', 32, 20]
result = bake(input_value, [{"op": 'RC6 Decrypt', "args": args}])
print(result)

Pipeline example

from pychef import Pipeline

args = [{'string': '', 'option': 'Hex'}, {'string': '', 'option': 'Hex'}, 'CBC', 'Hex', 'Raw', 'PKCS5', 32, 20]
transform = Pipeline().then('RC6 Decrypt', *args)
result = transform("example")

Dedicated operation module

The registered entry point lives in pychef.operations.by_operation.rc6_decrypt. Direct calls receive the input value and a positional argument tuple:

from pychef.operations.by_operation.rc6_decrypt import run

result = run("example", tuple([{'string': '', 'option': 'Hex'}, {'string': '', 'option': 'Hex'}, 'CBC', 'Hex', 'Raw', 'PKCS5', 32, 20]))
pychef.operations.by_operation.rc6_decrypt.run(value, args)

Run this operation using its shared internal implementation.

Parameters:
  • value (str | bytes)

  • args (Sequence[Any])

Return type:

str | bytes