SHA

Cryptography
{# Answer-first lead — frontend-gold-standard §1.1. Expects `lead` (plain text, already resolved by apps.content.leads). Rendered directly under the h1 so the self-contained answer is the first prose a reader, a SERP snippet, or an AI extractor meets. No curated-data gate: the view always supplies either curated content_summary or a computed fallback. #}

SHA denotes the Secure Hash Algorithm family, a set of NIST-standardised cryptographic hash functions that reduce arbitrary-length input to a fixed-size digest. In smart card systems a SHA function underlies digital signatures, message authentication, key derivation, and data integrity checking, so it is involved whenever a card signs a document, verifies a certificate, or computes a MAC. Five variants appear in card work: SHA-1, 160-bit over a 512-bit block, now deprecated but present in legacy EMV static data authentication and older certificates; SHA-224, approved but rarely used; SHA-256, the recommended choice and the one specified for ePassports, PIV, SCP03, and EMV combined data authentication; SHA-384, a 1024-bit block function used in high-assurance government cards; and SHA-512, reserved for specialised applications. Card signature operations hash first, then apply RSA or ECC to the digest.

Embed This Widget

Theme


      
    

Widget powered by . Free, no account required.

Also known as: Secure Hash Algorithm SHA-1 SHA-256 SHA-2

What Is SHA?

Secure Hash Algorithm (SHA) is a family of NIST-standardized cryptographic hash functions that produce fixed-size digests from arbitrary-length input data. In smart card systems, SHA hashes are fundamental to digital signatures, message authentication, key derivation, and data integrity verification. Every time a smart card signs a document, verifies a certificate, or computes a MAC, a SHA hash function is involved.

SHA Variants in Smart Cards

Algorithm Digest Size Block Size Status Smart Card Usage
SHA-1 160-bit 512-bit Deprecated Legacy EMV SDA, old certificates
SHA-224 224-bit 512-bit Approved Rarely used
SHA-256 256-bit 512-bit Recommended ePassport, PIV, SCP03, EMV CDA
SHA-384 384-bit 1024-bit Approved High-assurance government cards
SHA-512 512-bit 1024-bit Approved Specialized applications

How SHA Is Used on Smart Cards

SHA appears at multiple layers of smart card security:

  • Digital signatures -- when a card performs an RSA or ECC signature, it first hashes the data using SHA-256 (or SHA-384), then signs the hash. The small, fixed-size digest is what the asymmetric algorithm actually operates on.
  • Certificate verification -- verifying a certificate chain requires hashing the certificate body and comparing it against the issuer's signature. The card performs this when validating CVC certificates during terminal authentication.
  • Message authentication -- HMAC-SHA-256 and CMAC (which internally uses AES) are used to compute MACs for secure messaging integrity.
  • Key derivation -- SCP03 and PACE use SHA-based key derivation functions (KDFs) to derive session keys from shared secrets.

Hardware Acceleration

Smart card crypto coprocessors typically include dedicated SHA accelerators that process data at 5-20 MB/s, far faster than software computation on the card's CPU. This is important because hash operations are frequently invoked -- a single EMV transaction may require 10-20 SHA-256 computations for certificate verification, data authentication, and MAC generation.

SHA-1 Deprecation

SHA-1 has been cryptographically broken (practical collision attacks since 2017) and is deprecated for all security-critical smart card applications:

  • EMV -- migrating from SHA-1 to SHA-256 for offline data authentication
  • ePassport -- ICAO recommends SHA-256 or higher for new document signing certificates
  • FIPS 201 -- prohibits SHA-1 for PIV digital signatures

Legacy cards with SHA-1 certificates remain in circulation but are being replaced on natural lifecycle schedules.

{# FAQ block + FAQPage JSON-LD. Expects `faq_items` = [{"question", "answer"}]. Native
/ (frontend-gold-standard §1.7): the answer text is in the initial HTML and stays reachable with JavaScript disabled, so crawlers and AI extractors read answer-shaped chunks without depending on Alpine. #}

Frequently Asked Questions

Which SHA variant should a new smart card design use?

SHA-256 is the recommended choice and the variant specified for ePassports, PIV, SCP03, and EMV combined data authentication. SHA-384 appears in high-assurance government cards, and SHA-512 in specialised applications. SHA-1 is deprecated and survives only in legacy EMV static data authentication and older certificates.

What digest and block sizes do the SHA variants use?

SHA-1 produces a 160-bit digest over a 512-bit block, SHA-224 a 224-bit digest over 512 bits, SHA-256 a 256-bit digest over 512 bits, SHA-384 a 384-bit digest over a 1024-bit block, and SHA-512 a 512-bit digest over 1024 bits.

Why does a card hash data before signing it?

An RSA or ECC signature operates on a small fixed-size input. The card first reduces the data to a SHA-256 or SHA-384 digest and then applies the asymmetric operation to that digest, which is also what makes certificate chain verification tractable on constrained hardware.

What is the smart card glossary and who is it for?

The smart card glossary is a comprehensive reference of technical terms, acronyms, and concepts used in smart card technology. It covers protocols (APDU, T=0, T=1), security (Common Criteria, EAL, HSM), hardware (SE, EEPROM, contact pad), and applications (EMV, ePassport, eSIM). It serves developers, product managers, and engineers.

Are the glossary definitions available in other languages?

Yes. SmartCardFYI provides glossary definitions in 15 languages including English, Korean, Japanese, Chinese, Spanish, Portuguese, Hindi, Arabic, French, Russian, German, Turkish, Vietnamese, Indonesian, and Thai.