Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Izokatu is Ruby library that provides abstact interface for private-key and public-key cryptography using RbNaCl and OpenSSL.
Izokatu#call
XChaCha20Poly1305IETF
Curve25519XSalsa20Poly1305
AES-256-GCM
4096 bit key
secp521r1
AES-256-CTR
:function
(default, gets data from options), :file
:function
(default, just returns result), :file
, :stdout
gem install izokatu
Lost my access to rubygems acc, confirmation email are not received on mail, docs for gem are deleted (https://www.rubydoc.info/gems/izokatu), but early version gem itself is available. Don't use izokatu from rubygems.
So, use izokatu from git:
gem 'izokatu', :git => 'https://gitlab.com/mongalless/izokatu.git
in Gemfile
Or download .gem file in root and execute:
gem install ./path_to_gem_file/gem_file
If you have trouble installing the gem, file a ticket on the issues page.
RbNaCl private key cryptography
encrypted_data = Izokatu.call(clear_data_string: 'Some data')
Izokatu.call(action: :decryption, **encrypted_data)
=> {:decrypted_data_string=>"Some data"}
RbNaCl public key cryptography
keypair1 = Izokatu.call(action: :keys_generation, mode: :public_key)
keypair2 = Izokatu.call(action: :keys_generation, mode: :public_key)
encrypted_data = Izokatu.call(
clear_data_string: 'Some data',
mode: :public_key,
public_key: keypair1[:public_key],
private_key: keypair2[:private_key]
)
Izokatu.call(
action: :decryption,
mode: :public_key,
**encrypted_data,
public_key: keypair2[:public_key],
private_key: keypair1[:private_key]
)
=> {:decrypted_data_string=>"Some data"}
OpenSSL private key cryptography
encrypted_data = Izokatu.call(
clear_data_string: 'Some data',
via: :openssl,
cipher: 'AES-256-GCM'
)
Izokatu.call(
action: :decryption,
**encrypted_data,
via: :openssl,
cipher: 'AES-256-GCM'
)
=> {:decrypted_data_string=>"Some data"}
OpenSSL EC public key cryptography
keypair_options = {
action: :keys_generation,
mode: :public_key,
via: :openssl
}
keypair1 = Izokatu.call(keypair_options)
keypair2 = Izokatu.call(keypair_options)
encrypted_data = Izokatu.call(
clear_data_string: 'Some data',
mode: :public_key,
via: :openssl,
public_key:
keypair1[:public_key],
private_key: keypair2[:private_key]
)
Izokatu.call(
action: :decryption,
mode: :public_key,
via: :openssl,
**encrypted_data,
public_key: keypair2[:public_key],
private_key: keypair1[:private_key]
)
=> {:decrypted_data_string=>"Some data"}
OpenSSL RSA public key cryptography
keypair_options = {
action: :keys_generation,
mode: :public_key,
via: :openssl,
asym_cipher_type: :rsa,
bit_number: 4096
}
keypair1 = Izokatu.call(keypair_options)
keypair2 = Izokatu.call(keypair_options)
encrypted_data = Izokatu.call(
clear_data_string: 'Some data',
mode: :public_key,
via: :openssl,
public_key: keypair1[:public_key],
private_key: keypair2[:private_key],
asym_cipher_type: :rsa
)
Izokatu.call(
action: :decryption,
mode: :public_key,
via: :openssl,
**encrypted_data,
public_key: keypair2[:public_key],
private_key: keypair1[:private_key],
asym_cipher_type: :rsa
)
=> {:decrypted_data_string=>"Some data"}
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://gitlab.com/mongalless/izokatu.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that izokatu demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.