← QCE Digital Solutions Unit 4

Blowfish

A fast symmetric block cipher with a variable-length key (up to 448 bits) and 64-bit blocks. It is free for anyone to use, as it is in the public domain.

Understanding Blowfish in QCE Digital Solutions Unit 4

What it does: 64 bits divided by 8 bits per byte gives 8 bytes, the size of each Blowfish block. Blowfish is in the public domain, so no licence fee is paid to use it. Blowfish is a symmetric block cipher, so the same secret key is used to encrypt and to decrypt. Blowfish lets you choose the key length, up to a maximum of 448 bits. A fixed 56-bit key describes DES. Blowfish works on 64-bit blocks. AES uses 128-bit blocks. Blowfish encrypts fixed-size blocks with one shared key. Asymmetric ciphers like RSA use a key pair. Blowfish is known for being fast. Speed is one of its main strengths.

Common mistakes: Blowfish is a symmetric cipher because one shared key both encrypts and decrypts. Line 1 should be type = "symmetric". Blowfish has a variable-length key, so any key up to 448 bits is allowed. The check should be keyBits <= maxBits, not an exact match.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 17–88) and word search (Modules 17–125).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Blowfish uses one shared key to both encrypt and decrypt data.
FalseTrue
Matches
BLOCK_SIZE = 128 # Blowfish bits
↓
Blowfish uses 64-bit blocks, not 128-bit blocks. 128-bit blocks belong to AES.
Applying
Meanings
Term
Blowfish
Meaning
A fast symmetric block cipher with a variable-length key (up to 448 bits) and 64-bit blocks. It is free for anyone to use, as it is in the public domain.
Practice
cipher ← "Blowfish"
Testing
Gaps
blockBits ←
Check Answer
Spots
1type = "asymmetric"
2cipher = "Blowfish"

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Arctic Fox' badge — Tundra Tracker, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Blowfish uses one shared key to both encrypt and decrypt data.
A. True ✓
B. False
Blowfish is a symmetric block cipher, so the same secret key is used to encrypt and to decrypt.
2. Which describes the key length of Blowfish?
A. Fixed at exactly 56 bits
B. Variable length, up to 448 bits ✓
Blowfish lets you choose the key length, up to a maximum of 448 bits. A fixed 56-bit key describes DES.
3. How big is each block that Blowfish encrypts at a time?
A. 64 bits ✓
B. 128 bits
Blowfish works on 64-bit blocks. AES uses 128-bit blocks.
4. Which type of cipher is Blowfish?
A. Asymmetric public-key cipher
B. Symmetric block cipher ✓
Blowfish encrypts fixed-size blocks with one shared key. Asymmetric ciphers like RSA use a key pair.
5. A developer wants a cipher they can use in their app without paying a licence fee. Why could Blowfish suit them?
A. It is in the public domain, so anyone can use it for free ✓
B. It is patented, so only licensed companies can use it
Blowfish is in the public domain. Nobody owns it, so it is free for anyone to use.

Match the Pairs

cipher = Blowfish(key) → Sets up a Blowfish cipher with one secret key, so the same key encrypts and decrypts the data
len(key) <= 56 → Checks the key is at most 56 bytes (448 bits), the longest key Blowfish allows
Blowfish encrypts data in fixed 64-bit blocks, which is 8 bytes at a time → BLOCK_SIZE = 8
Blowfish is a block cipher that is not patented and is free for anyone to use because it is in the public domain → licenceFee = 0
BLOCK_SIZE = 128 # Blowfish bits → Blowfish uses 64-bit blocks, not 128-bit blocks. 128-bit blocks belong to AES.
key = 'a'*100 # 800-bit Blowfish key → A Blowfish key can be at most 448 bits (56 bytes), so an 800-bit key is too long.

Key Term

Blowfish
A fast symmetric block cipher with a variable-length key (up to 448 bits) and 64-bit blocks. It is free for anyone to use, as it is in the public domain.

Fill in the Blanks

1. blockBits ← 64
Hint: Type the number of bits in each Blowfish block.
2. maxKeyBits ← 448
Hint: Type the largest key length, in bits, that Blowfish allows.
3. blockBits ← 64 OUTPUT blockBits
Hint: Type the variable name that holds the Blowfish block size.
4. isPublicDomain ← TRUE
Hint: Type the Boolean value showing Blowfish is free for anyone to use.
5. IF keyBits <= 448 THEN OUTPUT "Valid Blowfish key" END IF
Hint: Type the comparison operator meaning 'no more than' so keys up to the limit are accepted.

Spot the Error

Question 1
A type = "asymmetric"
B cipher = "Blowfish"
C blockBits = 64
Line A — Blowfish is a symmetric cipher because one shared key both encrypts and decrypts. Line 1 should be type = "symmetric".
Question 2
A keyBytes = 16
B keyBits = keyBytes * 8
C maxBits = 448
D valid = keyBits == maxBits
Line D — Blowfish has a variable-length key, so any key up to 448 bits is allowed. The check should be keyBits <= maxBits, not an exact match.
Question 3
A blockBits = 128
B blockBytes = blockBits // 8
C print(blockBytes)
Line A — Blowfish works on 64-bit blocks, not 128-bit blocks (AES uses 128). Line 1 should be blockBits = 64.
Question 4
A cipher = "Blowfish"
B maxKeyBits = 64
C minKeyBits = 32
Line B — The maximum Blowfish key length is 448 bits. 64 is the block size, not the key limit. Line 2 should be maxKeyBits = 448.
Question 5
A cipher = "Blowfish"
B keyLength = "fixed"
C print(cipher, keyLength)
Line B — Blowfish allows a variable-length key, up to 448 bits. Line 2 should be keyLength = "variable".

Student with a class code? Join your class →