Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

Kyber

Symbols

  • KyberDecapsulate
  • KyberEncapsulate
  • KyberKeyGen
ToneAr`Kyber`
KyberEncapsulate
​
KyberEncapsulate
[publicKey]
encapsulates a shared secret using the given
publicKey
.
​
Details and Options
​
Examples  
(3)
Basic Examples  
(1)
Generate a key pair and encapsulate a shared secret:
In[1]:=
keys=
KyberKeyGen
[768]
Out[1]=
PublicKeyPublicKey
Type: ML-KEM
Parameter set: 768
Public key size:
9472
b
,PrivateKeyPrivateKey
Type: ML-KEM
Parameter set: 768
Private key size:
19200
b

In[2]:=
encap=
KyberEncapsulate
[keys["PublicKey"]]
Out[2]=
EncapsulatedKeyEncapsulatedKey
Type: ML-KEM
Parameter set: 768
Cipher text size:
8704
b
,SharedSecretSymmetricKey
Cipher: AES256
Key size:
256
b

The ciphertext to send to the private key holder:
In[3]:=
encap["EncapsulatedKey"]
Out[3]=
EncapsulatedKey
Type: ML-KEM
Parameter set: 768
Cipher text size:
8704
b

The shared secret for symmetric encryption:
In[4]:=
encap["SharedSecret"]
Out[4]=
SymmetricKey
Cipher: AES256
Key size:
256
b

Scope  
(1)

Properties & Relations  
(1)

SeeAlso
KyberKeyGen
 
▪
KyberDecapsulate
 
▪
Encrypt
RelatedLinks
▪
NIST Post-Quantum Cryptography
""

© 2026 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com