
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
ml_kem is a Ruby gem that implements the ML-KEM (Kyber) post-quantum key encapsulation mechanism (KEM), as selected by NIST for standardization under the FIPS 203. It supports key generation, encapsulation, and decapsulation in pure Ruby and includes a command-line interface for easy integration into workflows.
ml_kem_512
, ml_kem_768
, and ml_kem_1024
Install the gem and add to the application's Gemfile by executing:
bundle add ml_kem
If bundler is not being used to manage dependencies, install the gem by executing:
gem install ml_kem
The mlkem
command-line tool allows you to generate keys, encapsulate, and decapsulate secrets using ML-KEM.
Generate keys:
mlkem keygen -p public_key.pem -s private_key.pem -v ml_kem_768
Encapsulate a secret:
mlkem encaps -p public_key.pem -c ciphertext.txt -k shared_secret.key
Decapsulate:
mlkem decaps -s private_key.pem -c ciphertext.txt -k shared_secret.key
To obtain information about the options available for a command use:
mlkem help COMMAND
require "ml_kem"
# Create an instance with the desired variant
kem = MLKEM::MLKEM.new(variant: :ml_kem_768)
# Generate key pair
public_key, private_key = kem.keygen
# Encapsulate a shared secret
shared_secret, ciphertext = kem.encaps(public_key)
# Decapsulate to recover the shared secret
recovered_secret = kem.decaps(private_key, ciphertext)
After checking out the repo, run bin/setup
to install dependencies. Then, run rake test
to run the tests. You can also run bin/console
for an interactive prompt that will start an IRB and allow you to experiment.
Bug reports and pull requests are welcome on GitHub at https://github.com/MarioRgzLpz/ml_kem.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that ml_kem demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.