Skip to content

Conversation

@thomasxm
Copy link

Summary

Adds RC6 block cipher implementation to CyberChef:

  • RC6 - AES finalist by Ron Rivest, Matt Robshaw, Ray Sidney, and Yiqun Lisa Yin

New Operations

RC6 (AES Finalist)

  • RC6 Encrypt - 128-bit block encryption with 128/192/256-bit keys
  • RC6 Decrypt - 128-bit block decryption with 128/192/256-bit keys
  • Modes: ECB, CBC, CFB, OFB, CTR
  • 20 rounds, parameterised Feistel-like structure with data-dependent rotations

Padding Options

  • PKCS5 (PKCS#7)
  • NO (none - requires block-aligned input)
  • ZERO
  • RANDOM
  • BIT (ISO/IEC 7816-4)

Use Cases

  • General-purpose encryption
  • Legacy system compatibility
  • AES alternative (same block/key sizes)
  • Educational purposes (studying AES competition finalists)

Files Changed

File Action
src/core/lib/RC6.mjs NEW
src/core/operations/RC6Encrypt.mjs NEW
src/core/operations/RC6Decrypt.mjs NEW
src/core/config/Categories.json Added operations
tests/operations/tests/RC6.mjs NEW
tests/operations/index.mjs Registered tests

Testing

  • More than 1000 tests pass
  • Official IETF draft test vectors for 128-bit key
  • Cross-verified test vectors for 192/256-bit keys

Implementation Notes

  • Pure JavaScript implementation (no external dependencies)
  • Uses 32-bit word operations with data-dependent rotations
  • Consistent API with existing CyberChef cipher operations (SM4, Blowfish, Twofish, GOST)
  • RC6-32/20/b variant (AES-compatible parameters)

References

Add RC6 block cipher encrypt/decrypt operations.

RC6 is a symmetric block cipher designed by Ron Rivest et al.
It was an AES finalist and supports 128/192/256-bit keys.

Features:
- ECB, CBC, CFB, OFB, CTR modes
- Multiple padding options (PKCS7, Zero, None)
- 128-bit block size, 20 rounds

Includes official test vectors from IETF draft.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant