SeoulTech 알고리즘 특론
nykim@seoultech.ac.kr
1. MAC and Symmetric encryption
2. Galois/Counter Mode (GCM)
3. GCM and GMAC
• MAC(Message Authentication Code)
– Integrity: an attacker can’t modify the data and then
compute a new MAC, because a secret key is needed
– Authentication: only the user who has got the secret
key can authenticate the message
• Symmetric encryption
– Confidentiality: data are encrypted
– Authentication: if only 2 users share the secret key
• Galois/Counter Mode (GCM) is authenticated
encryption with associated data.
• GCM is constructed from an approved symmetric
key block cipher with a block size of 128 bits.
• GCM provides assurance of the authenticity of
the confidential data using a universal hash
function that is defined over a NIST Special
Publication 800-38D.
• An authenticated encryption solution
• Encryption
– Use of the block cipher AES
– Mode of operation similar to the CTR
• Authentication
– The MAC provided is a sort of keyed digest
– Can provide authentication only → GMAC(Galois MAC)
• used for confidentiality and integrity
• there may be present optional not encrypted part of message
(A): e.g., network packet headers
• computation of integrity check value (ICV) is made over the
ciphertext (not plaintext): effective for network traffic protection
with denial-of-service (DoS) attack countermeasures
• the fastest mode for confidentiality and integrity
• special Intel and AMD processor assembler instruction
(PCLMULQDQ) for this mode supports
• length extensions attack protected
• small amount of weak keys may exist for integrity check
• Extremely fast, more than 10Gbps
• Easy to implement in software and hardware.
• Can be used for authentication only, if desired.
• Designed for AES, optimized for 128 bits.
• Arbitrary length IV, optimized for 96 bits.
• Only one key for authentication and encryption.
• No intellectual property restrictions.
• encryption with GCTR
• GCTRK
• encryption with GCTR(Galois Counter Mode)
1. If X is the empty string, then return the empty string as Y
2. Let n=[len(X)/128]
3. Let X1, X 2, ... , X n-1, X*n denote the unique sequence of
blocks such that X = X 1 || X 2 || ... || X n-1 || X*n
4. X1, X2,..., Xn-1 are complete blocks.
Consequently, Xn* is either a complete block or a nonempty
partial block, and if 1 ≤ len(X) ≤128, then X = X1*
5. Let CB1=ICB
6. For i = 2 to n, let CBi = inc32(CBi-1)
7. For i=1 to n-1, let Yi=Xi⊕CIPHK(CBi)
8. Let Y*n=X*n⊕MSBlen(X*n)(CIPHK(CBn))
9. Let Y= Y1||Y2||…||Y*n
10. Return Y
• GHASHH
• Let X1, X 2, ... , X m-1, X m
denote the unique sequence
of blocks such that X = X 1 ||
X 2 || ... || X m-1 || X m
• Let Y0 be the “zero block”,
0128
• For i = 1, ..., m,
let Yi = (Yi-1 ⊕ Xi) • H
• Return Ym
• GCTRK – GHASHH
• GCTRK – GHASHH
• GCM-AEK
1. Let H = CIPHK(0
128
).
2. Define a block, J0, as follows:
If len(IV)=96, then let J0 = IV || 0
31
||1.
If len(IV) ≠ 96, then let s = 128[len(IV)/128]–len(IV), and let
J0=GHASHH(IV||0
s+64
||[len(IV)]64).
3. Let C=GCTRK(inc32(J0), P)
4. Let u = 128 . [len(C)/128]–len(C) and let v = 128 . [len(A)/128]–len(A)
5. Define a block, S, as follows:
S = GHASHH (A || 0
v
|| C || 0
u
|| [len(A)]64 || [len(C)]64).
6. Let T = MSBt(GCTRK(J0,S))
7. Return (C, T)
• GCM-ADK
• GMAC
• GCM-ADK
• Morris Dworkin, “Recommendation for Block Cipher Modes of
Operation: Galois/Counter Mode (GCM) and GMAC”, NIST, 2007
• David A. McGrew, John Viega, “The Galois/Counter Mode of
Operation (GCM)”,
• Sharon S. Keller, Timothy A. Hall, “The Galois/Counter Mode
(GCM) and GMAC Validation System (GCMVS) with the Addition
of XPN Validation Testing”, National Institute of Standards and
Technology, 2016
• Vidder,"Galois/Counter Mode (GCM) and GMAC",youtube,2016
21

More Related Content

PDF
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
PDF
Palo Alto VM-100 Configuration Lab
PDF
Embedded systems course - student resume template
PDF
OpenWrt From Top to Bottom
PDF
LAS16-504: Secure Storage updates in OP-TEE
PPTX
Amba axi 29 3_2015
PDF
LCU14 500 ARM Trusted Firmware
PPT
PCIe and PCIe driver in WEC7 (Windows Embedded compact 7)
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Palo Alto VM-100 Configuration Lab
Embedded systems course - student resume template
OpenWrt From Top to Bottom
LAS16-504: Secure Storage updates in OP-TEE
Amba axi 29 3_2015
LCU14 500 ARM Trusted Firmware
PCIe and PCIe driver in WEC7 (Windows Embedded compact 7)

What's hot (20)

PPTX
Module 2 ARM CORTEX M3 Instruction Set and Programming
PDF
Challenges in Using UVM at SoC Level
PPT
Basic Linux Internals
PDF
Cracking WPA/WPA2 with Non-Dictionary Attacks
PDF
Alphorm.com Formation CCNP ENCOR 350-401 (2of8) : Routing
PPT
Linux Troubleshooting
PDF
Verification Strategy for PCI-Express
PDF
U-Boot - An universal bootloader
PDF
MQTT - A practical protocol for the Internet of Things
PPT
Introduction to SSH
PDF
도커 없이 컨테이너 만들기 3편
PPTX
PDF
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
PPTX
Layer 2 switching
PPTX
Slideshare - PCIe
PDF
Ip tunnelling and_vpn
PDF
Uboot startup sequence
PPTX
Active Directory Domain Services.pptx
PDF
A practical guide to buildroot
PPT
Pcie drivers basics
Module 2 ARM CORTEX M3 Instruction Set and Programming
Challenges in Using UVM at SoC Level
Basic Linux Internals
Cracking WPA/WPA2 with Non-Dictionary Attacks
Alphorm.com Formation CCNP ENCOR 350-401 (2of8) : Routing
Linux Troubleshooting
Verification Strategy for PCI-Express
U-Boot - An universal bootloader
MQTT - A practical protocol for the Internet of Things
Introduction to SSH
도커 없이 컨테이너 만들기 3편
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
Layer 2 switching
Slideshare - PCIe
Ip tunnelling and_vpn
Uboot startup sequence
Active Directory Domain Services.pptx
A practical guide to buildroot
Pcie drivers basics
Ad

Similar to Algorithm (MAC/GCM/GMAC) (20)

PDF
Optimizing GELI Performance by John-Mark Gurney
PPT
14_526_topic04.ppt
PDF
High Speed VLSI Architecture for AES-Galois/Counter Mode
PPTX
lec20111111111111111111111111111111111111.pptx
PDF
Authenticated Encryption Gcm Ccm
PPTX
Cryptography - Simplified - Symmetric Encryption
PDF
Post quantum cryptography - thesis
PDF
PPTX
ServerDecwweddgccgccfgvxgxcvfxvhfxvr.pptx
PDF
One to many (new scheme for symmetric cryptography)
PDF
Js2517181724
PDF
Js2517181724
PPTX
PPTX
OS ppt Modified.pptx
PDF
IPsec for IMS
PDF
AllBits presentation - Security in Theory
PDF
Keccak
PPT
Optimizing GELI Performance by John-Mark Gurney
14_526_topic04.ppt
High Speed VLSI Architecture for AES-Galois/Counter Mode
lec20111111111111111111111111111111111111.pptx
Authenticated Encryption Gcm Ccm
Cryptography - Simplified - Symmetric Encryption
Post quantum cryptography - thesis
ServerDecwweddgccgccfgvxgxcvfxvhfxvr.pptx
One to many (new scheme for symmetric cryptography)
Js2517181724
Js2517181724
OS ppt Modified.pptx
IPsec for IMS
AllBits presentation - Security in Theory
Keccak
Ad

More from Nam Yong Kim (9)

PPTX
Blockchain-based multiple AAA system in edge computing for IoT networks
PPTX
Hybrid Virtual Machine-based SDN System in Cloud
PPTX
Novel user allocation scheme for full duplex multi-user bidirectional Li-Fi n...
PPT
Specific innovative semi-transparent solar cell for indoor and outdoor LiFi a...
PDF
효율적인 클라우드 환경을 위한 가상화 및 SDN/NFV 기술 연구
PDF
A secure system for pervasive social network based healthcare
PDF
Chap06 block cipher operation
PDF
Cloud tech or SecaaS
PDF
ZodiacWX_Northbound Networks manual1
Blockchain-based multiple AAA system in edge computing for IoT networks
Hybrid Virtual Machine-based SDN System in Cloud
Novel user allocation scheme for full duplex multi-user bidirectional Li-Fi n...
Specific innovative semi-transparent solar cell for indoor and outdoor LiFi a...
효율적인 클라우드 환경을 위한 가상화 및 SDN/NFV 기술 연구
A secure system for pervasive social network based healthcare
Chap06 block cipher operation
Cloud tech or SecaaS
ZodiacWX_Northbound Networks manual1

Recently uploaded (20)

PPTX
Folder Lock 10.1.9 Crack With Serial Key
PDF
Top 10 Project Management Software for Small Teams in 2025.pdf
PPTX
Human-Computer Interaction for Lecture 2
PPTX
Independent Consultants’ Biggest Challenges in ERP Projects – and How Apagen ...
PPTX
Chapter_05_System Modeling for software engineering
PPTX
Lesson-3-Operation-System-Support.pptx-I
PPTX
Human Computer Interaction lecture Chapter 2.pptx
PDF
Understanding the Need for Systemic Change in Open Source Through Intersectio...
PPTX
StacksandQueuesCLASS 12 COMPUTER SCIENCE.pptx
PPTX
SAP Business AI_L1 Overview_EXTERNAL.pptx
PDF
IT Consulting Services to Secure Future Growth
PPTX
HackYourBrain__UtrechtJUG__11092025.pptx
PDF
Building an Inclusive Web Accessibility Made Simple with Accessibility Analyzer
PDF
Cloud Native Aachen Meetup - Aug 21, 2025
PPTX
Streamlining Project Management in the AV Industry with D-Tools for Zoho CRM ...
PPTX
Post-Migration Optimization Playbook: Getting the Most Out of Your New Adobe ...
PDF
Crypto Loss And Recovery Guide By Expert Recovery Agency.
PDF
Mobile App for Guard Tour and Reporting.pdf
PPTX
Human-Computer Interaction for Lecture 1
PDF
infoteam HELLAS company profile 2025 presentation
Folder Lock 10.1.9 Crack With Serial Key
Top 10 Project Management Software for Small Teams in 2025.pdf
Human-Computer Interaction for Lecture 2
Independent Consultants’ Biggest Challenges in ERP Projects – and How Apagen ...
Chapter_05_System Modeling for software engineering
Lesson-3-Operation-System-Support.pptx-I
Human Computer Interaction lecture Chapter 2.pptx
Understanding the Need for Systemic Change in Open Source Through Intersectio...
StacksandQueuesCLASS 12 COMPUTER SCIENCE.pptx
SAP Business AI_L1 Overview_EXTERNAL.pptx
IT Consulting Services to Secure Future Growth
HackYourBrain__UtrechtJUG__11092025.pptx
Building an Inclusive Web Accessibility Made Simple with Accessibility Analyzer
Cloud Native Aachen Meetup - Aug 21, 2025
Streamlining Project Management in the AV Industry with D-Tools for Zoho CRM ...
Post-Migration Optimization Playbook: Getting the Most Out of Your New Adobe ...
Crypto Loss And Recovery Guide By Expert Recovery Agency.
Mobile App for Guard Tour and Reporting.pdf
Human-Computer Interaction for Lecture 1
infoteam HELLAS company profile 2025 presentation

Algorithm (MAC/GCM/GMAC)

  • 2. 1. MAC and Symmetric encryption 2. Galois/Counter Mode (GCM) 3. GCM and GMAC
  • 3. • MAC(Message Authentication Code) – Integrity: an attacker can’t modify the data and then compute a new MAC, because a secret key is needed – Authentication: only the user who has got the secret key can authenticate the message • Symmetric encryption – Confidentiality: data are encrypted – Authentication: if only 2 users share the secret key
  • 4. • Galois/Counter Mode (GCM) is authenticated encryption with associated data. • GCM is constructed from an approved symmetric key block cipher with a block size of 128 bits. • GCM provides assurance of the authenticity of the confidential data using a universal hash function that is defined over a NIST Special Publication 800-38D.
  • 5. • An authenticated encryption solution • Encryption – Use of the block cipher AES – Mode of operation similar to the CTR • Authentication – The MAC provided is a sort of keyed digest – Can provide authentication only → GMAC(Galois MAC)
  • 6. • used for confidentiality and integrity • there may be present optional not encrypted part of message (A): e.g., network packet headers • computation of integrity check value (ICV) is made over the ciphertext (not plaintext): effective for network traffic protection with denial-of-service (DoS) attack countermeasures • the fastest mode for confidentiality and integrity • special Intel and AMD processor assembler instruction (PCLMULQDQ) for this mode supports • length extensions attack protected • small amount of weak keys may exist for integrity check
  • 7. • Extremely fast, more than 10Gbps • Easy to implement in software and hardware. • Can be used for authentication only, if desired. • Designed for AES, optimized for 128 bits. • Arbitrary length IV, optimized for 96 bits. • Only one key for authentication and encryption. • No intellectual property restrictions.
  • 9. • GCTRK • encryption with GCTR(Galois Counter Mode)
  • 10. 1. If X is the empty string, then return the empty string as Y 2. Let n=[len(X)/128] 3. Let X1, X 2, ... , X n-1, X*n denote the unique sequence of blocks such that X = X 1 || X 2 || ... || X n-1 || X*n 4. X1, X2,..., Xn-1 are complete blocks. Consequently, Xn* is either a complete block or a nonempty partial block, and if 1 ≤ len(X) ≤128, then X = X1* 5. Let CB1=ICB
  • 11. 6. For i = 2 to n, let CBi = inc32(CBi-1) 7. For i=1 to n-1, let Yi=Xi⊕CIPHK(CBi) 8. Let Y*n=X*n⊕MSBlen(X*n)(CIPHK(CBn)) 9. Let Y= Y1||Y2||…||Y*n 10. Return Y
  • 12. • GHASHH • Let X1, X 2, ... , X m-1, X m denote the unique sequence of blocks such that X = X 1 || X 2 || ... || X m-1 || X m • Let Y0 be the “zero block”, 0128 • For i = 1, ..., m, let Yi = (Yi-1 ⊕ Xi) • H • Return Ym
  • 13. • GCTRK – GHASHH
  • 14. • GCTRK – GHASHH
  • 16. 1. Let H = CIPHK(0 128 ). 2. Define a block, J0, as follows: If len(IV)=96, then let J0 = IV || 0 31 ||1. If len(IV) ≠ 96, then let s = 128[len(IV)/128]–len(IV), and let J0=GHASHH(IV||0 s+64 ||[len(IV)]64). 3. Let C=GCTRK(inc32(J0), P) 4. Let u = 128 . [len(C)/128]–len(C) and let v = 128 . [len(A)/128]–len(A) 5. Define a block, S, as follows: S = GHASHH (A || 0 v || C || 0 u || [len(A)]64 || [len(C)]64). 6. Let T = MSBt(GCTRK(J0,S)) 7. Return (C, T)
  • 20. • Morris Dworkin, “Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM) and GMAC”, NIST, 2007 • David A. McGrew, John Viega, “The Galois/Counter Mode of Operation (GCM)”, • Sharon S. Keller, Timothy A. Hall, “The Galois/Counter Mode (GCM) and GMAC Validation System (GCMVS) with the Addition of XPN Validation Testing”, National Institute of Standards and Technology, 2016 • Vidder,"Galois/Counter Mode (GCM) and GMAC",youtube,2016
  • 21. 21