Toolkit for Encryption, Signatures and Certificates Based on OpenSSL

Bindings to OpenSSL libssl and libcrypto, plus custom SSH pubkey parsers. Supports RSA, DSA and EC curves P-256, P-384 and P-521. Cryptographic signatures can either be created and verified manually or via x509 certificates. AES can be used in cbc, ctr or gcm mode for symmetric encryption; RSA for asymmetric (public key) encryption or EC for Diffie Hellman. High-level envelope functions combine RSA and AES for encrypting arbitrary sized data. Other utilities include key generators, hash functions (md5, sha1, sha256, etc), base64 encoder, a secure random number generator, and 'bignum' math methods for manually performing crypto calculations on large multibyte integers.



  • Support for new API in OpenSSL 1.1.0
  • Remove 'pseudo_rand_bytes()' (deprecated in libssl)
  • Work around missing EVP_CIPH_GCM_MODE in OpenSSL 1.0.0
  • Add read_pkcs12() and write_pkcs12() functions
  • Add read_pem() for debugging PEM files
  • Add base methods [, [[, $, names, .DollarNames for keys and certificates
  • Update libssl on Windows to 1.0.2h
  • Add #define _POSIX_C_SOURCE in ssl.c to ensure getaddrinfo() is available
  • Add as.character.hash method for raw hashes
  • Clear error buffer when raising an error


  • Fix ec_keygen() for old versions of OpenSSL
  • Added aes_ctr() and aes_gcm() modes
  • Added aes_keygen()
  • Added bignum_mod_inv()
  • Internal tools for JWT/JWK support (see pkg: jose)


  • Added ec_dh() function for ECDH
  • Added --atleast-version=1.0 to pkg-config in configure script
  • Switch as.list(cert) to RFC2253 format for 'subject' and 'issuer' fields


  • Disable EC stuff for OPENSSL_NO_EC (needed on some Solaris / Gentoo)
  • Added openssl_config() function to test if libssl is built with EC support
  • Make configure script bourne compatible (remove bash shebang)
  • Tweak for OpenBSD in ssl.c
  • Added sha224, sha384 and sha2 functions
  • Export the fingerprint function


  • Fix for getaddrinfo() in Solaris
  • Use the configurable askpass() for password prompt


  • Switched download_ssl_cert to getaddrinfo() api for ipv6 support
  • Fix for example for naming conflict with new digest package


  • Configure script now checks for OpenSSL minimum version 1.0.0


  • Breaking change: hash functions now use hmac 'key' instead of a 'salt'
  • The my_key() and my_pubkey() functions now work as documented
  • as.list(cert) add alt_names field for https certs with multiple domains
  • added export_pem for certificates


  • Added --force-bottle to autobrew installer
  • Use nonblocking socket in ssl to set connection timeout
  • Fix UBSAN problem in ssl.c
  • Fix ASAN problem in hash.c


  • Major overhaul, add encryption, signature, cert stuff
  • Upgrade libssl and libcrypto on windows to 1.0.2d


  • Added base64 functions

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.9.9 by Jeroen Ooms, 2 months ago

Report a bug at

Browse source code at

Authors: Jeroen Ooms [cre, aut], Oliver Keyes [ctb]

Documentation:   PDF Manual  

MIT + file LICENSE license

Suggests testthat, digest, knitr, rmarkdown, jsonlite, jose

System requirements: OpenSSL >= 1.0.1

Imported by RPresto, RSelenium, SensusR, aphid, backblazer, base64, bcrypt, geosapi, googleCloudStorageR, httr, icesSAG, ids, keyring, mongolite, opencpu, phylogram, pinnacle.API, reconstructr, rtweet, scidb, secret, sparklyr, splashr.

Depended on by jose.

Suggested by base64url, dataone.

See at CRAN