Encryption vs. tokenization: How they’re different and how they work together

Payments
Payments

提供面向各类企业的全方位支付解决方案,满足从初创公司到跨国企业的多维度需求,助力全球范围内线上线下付款。

了解更多 
  1. 导言
  2. How does encryption work?
  3. What is encryption used for?
  4. How does tokenization work?
  5. What is tokenization used for?
  6. Tokenization vs. encryption: Key differences and how they work together
    1. An example of using tokenization and encryption together
  7. Best practices for using encryption and tokenization in your business
    1. Encryption
    2. Tokenization
    3. Combining encryption and tokenization

Encryption and tokenization are both data security techniques. Encryption scrambles sensitive data, making it unreadable without a decryption key. Tokenization replaces sensitive data with a nonsensitive substitute (a token), which has no value on its own. The growth of online and digital payments has led to a rise in these security methods, with the volume of tokenized payment transactions projected to surpass one trillion globally by 2026.

Below, we’ll unpack the differences between encryption and tokenization, including how both work, how they’re used, and what businesses need to know about using them together to keep payments systems secure.

What’s in this article?

  • How does encryption work?
  • What is encryption used for?
  • How does tokenization work?
  • What is tokenization used for?
  • Tokenization vs. encryption: Key differences and how they work together
  • Best practices for using encryption and tokenization in your business

How does encryption work?

Encryption transforms plaintext, the readable form of data, into ciphertext, an unreadable format. It transforms data by using a cryptographic algorithm (a set of mathematical rules that dictate how the data is scrambled) and a key (a piece of information, like a password, that’s used by the algorithm to encrypt and decrypt the data).

Here’s a simplified example of how it works:

  • Plaintext: “Hello”

  • Key: “Secret”

  • Algorithm: Caesar cipher (shifts each letter in the alphabet by a certain number of places)

  • Encryption: The algorithm, using the key “Secret,” shifts each letter in “Hello” by three places, resulting in the ciphertext “Khoor.”

Only someone with the correct key (“Secret”) and knowledge of the algorithm (Caesar cipher) would be able to decrypt the ciphertext back into the original plaintext.

There are many different types of encryption algorithms, each with varying levels of complexity and security. Some commonly used algorithms include Advanced Encryption Standard (AES) and Rivest-Shamir-Adleman (RSA).

The encryption’s strength depends on several factors, including the algorithm used, the key’s length and complexity, and the security of the systems for storing and transmitting encrypted data.

What is encryption used for?

Encryption protects sensitive information. Here are some of the most common applications:

  • Communication: Encryption protects data transmitted over networks—like emails, messages, and online transactions—so that only authorized parties can access the information, preventing eavesdropping and tampering.

  • Data storage: Encryption protects data stored on devices and servers, making it unreadable to unauthorized individuals. This is important for sensitive information, such as personal data, financial records, and confidential business documents.

  • Password protection: Encryption stores and protects passwords. Instead of storing passwords in plaintext, encryption converts them into encrypted hashes. This makes it difficult for hackers to recover the passwords, even if they gain access.

  • File transfer: Encryption keeps data confidential when someone transfers files over the internet or other networks, protecting sensitive information such as intellectual property, medical records, and financial data.

  • Financial transactions: Encryption keeps financial transactions in online banking and payment systems confidential, protecting sensitive information like credit card numbers and bank account details.

  • Virtual private networks (VPNs): VPNs use encryption to create secure connections over public networks, allowing users to securely and privately access resources. Businesses often use VPNs to protect sensitive data transmitted between offices and remote employees.

  • Digital rights management (DRM): DRM systems use encryption to control access to copyrighted material like software, music, and videos. This prevents unauthorized copying or distribution.

  • Browsing: Hypertext Transfer Protocol Secure (HTTPS) uses encryption to protect website traffic, keeping data transmitted between the user’s browser and the website server confidential.

  • Messaging apps: Many messaging apps use end-to-end encryption so that only the sender and intended recipient can read the messages. This provides a high level of privacy and security for sensitive communications.

How does tokenization work?

Tokenization substitutes sensitive data—such as a credit card number, social security number, and any other confidential information—with a nonsensitive, randomly generated equivalent called a token. This token is a string of characters that has no inherent value or meaning. Even if a token is compromised, it is useless to an attacker because it does not contain sensitive information. There are numerous uses for tokens, making them a versatile tool for protecting sensitive data.

Tokenization systems manage the tokens and their relationship with the original data. These systems store the original sensitive data in a highly secure environment; this is often referred to as a token vault, which is isolated and protected from unauthorized access. The system will then use the token instead of the original data when completing processes like transactions. In some cases, the system can retrieve the original sensitive data from the token vault using a process called detokenization, but it typically does so only when absolutely necessary and under strict security controls. Tokens are irreversible by design, meaning they cannot be used to derive the original sensitive data without access to the token vault.

What is tokenization used for?

Tokenization keeps sensitive data secure and private in a wide range of industries and applications. Here are some common use cases:

  • Payment Card Industry Data Security Standard (PCI DSS): Tokenization protects credit card data. It helps merchants and payment processors comply with PCI DSS regulations by reducing the risk of data breaches and fraud.

  • Ecommerce: Tokenization secures online transactions, protecting customer payment information during processing and storage. This helps protect both businesses and customers from financial losses due to unauthorized access to card data.

  • Healthcare: Tokenization protects patient health information (PHI) by replacing sensitive data elements like Social Security numbers or medical ID numbers with tokens. This helps healthcare providers comply with Health Insurance Portability and Accountability Act (HIPAA) regulations and protect patients’ privacy.

  • Financial services: Financial applications like mobile payments, peer-to-peer transactions, and account linking use tokenization to protect sensitive financial data from unauthorized access and fraud.

  • Loyalty programs: Tokenization secures data from customer loyalty programs, including rewards points or membership numbers, to protect customers’ information and prevent misuse.

  • Data storage: Tokenization protects sensitive data stored in databases or the cloud, reducing the risk of data breaches and keeping information confidential.

  • Government and public sector: Tokenization protects sensitive government and public sector data like identification information, tax records, and Social Security numbers.

Tokenization vs. encryption: Key differences and how they work together

Tokenization and encryption are complementary data security techniques that are often used together. Encryption transforms plaintext data into an unreadable format (ciphertext) using a cryptographic algorithm and a key. Tokenization substitutes sensitive data with a surrogate value known as a token, which has no intrinsic value or meaning and bears no mathematical relationship to the original data.

Here’s some of their distinctions and functional overlap:

方法
加密
令牌化
可撤销性 可以用正确的密钥撤销 不访问令牌库的情况下无法撤销
数据格式 改变原始数据结构 保留原始数据格式
安全焦点 保护静态和传输中的数据 主要保护静态数据
合规 有助于满足合规性要求,但可能无法完全隔离敏感数据 通过从环境中移除敏感数据来促进法规遵从性
用例 非常适合需要以原始形式读取和处理的数据 最适合需要引用但不公开的数据

Tokenization and encryption together can create a layered security approach. Here’s a closer look at how they work together:

  • Tokenization for storage: A user tokenizes sensitive data and stores it in a database.

  • Encryption for transmission: When tokens need to be transmitted for purposes like payment processing, the user can encrypt them for secure communication.

  • Detokenization (if necessary): In specific scenarios that require access to the original data, authorized parties can use the token vault to detokenize the data under strict security protocols.

An example of using tokenization and encryption together

A retailer is storing customer credit card information. Instead of storing the actual card numbers, they use tokenization to replace them with tokens. The retailer uses the tokens for transactions, while the actual card numbers are securely stored in a token vault and encrypted for additional protection.

Best practices for using encryption and tokenization in your business

Encryption and tokenization are important components of a robust data security system. Here are some best practices for implementing effective, compliant security standards:

  • Compliance: Understand the relevant data protection regulations in your industry (e.g., PCI DSS, HIPAA, General Data Protection Regulation [GDPR]) to ensure your encryption and tokenization practices are in compliance.

  • Security audits: Regularly review and audit your encryption and tokenization processes to identify potential weaknesses and vulnerabilities.

  • Employee training: Educate your employees on the importance of data security and the proper handling of sensitive information.

  • Incident response plan: Plan a quick, effective response to possible security breaches.

Encryption

Here are some best practices for using encryption:

  • Use industry-standard algorithms like AES with appropriate key lengths (e.g., AES-256). Avoid outdated or weak algorithms.

  • Protect your encryption keys. Store them securely, tightly control access, and regularly rotate them. Consider using a Hardware Security Module (HSM) for even more protection.

  • Encrypt sensitive data when it’s stored on your servers, in the cloud, and when it’s transmitted over networks.

  • Use secure protocols such as Transport Layer Security (TLS) to encrypt communication channels to keep data transmitted between systems confidential.

Tokenization

Here are some best practices for using tokenization:

  • Prioritize tokenization for highly sensitive data such as credit card numbers, Social Security numbers, and any personally identifiable information (PII).

  • Store the original data and its relationship to the tokens in a secure token vault, separate from your production environment. Implement strong access controls and monitoring for the vault.

  • Consider format-preserving tokenization (FPT) to maintain the original format of the data to simplify integration with existing systems and applications.

  • Develop a clear policy for generating, using, and retiring tokens to ensure they are used appropriately and don’t become stale or vulnerable.

Combining encryption and tokenization

Here are some best practices for combining encryption and tokenization in your security system:

  • Combine the strengths of both techniques for greater security. Encrypt tokenized data to further protect it during transmission.

  • Use tokenization for the most sensitive data and encrypt other sensitive information to balance security with performance and usability.

  • Evaluate the risk associated with different types of data and apply appropriate protection measures accordingly. Not all types of data need the same level of security.

本文中的内容仅供一般信息和教育目的,不应被解释为法律或税务建议。Stripe 不保证或担保文章中信息的准确性、完整性、充分性或时效性。您应该寻求在您的司法管辖区获得执业许可的合格律师或会计师的建议,以就您的特定情况提供建议。

准备好开始了?

创建账户即可开始收款,无需签署合同或填写银行信息。您也可以联系我们,为您的企业定制专属支付解决方案。
Payments

Payments

借助为各种企业打造的支付解决方案,实现全球范围线上线下收款。

Payments 文档

查找 Stripe 的付款 API 集成指南。