---
title: Crypto-types
url: 'https://brendo.org/wp-content/plugins/two-factor-provider-webauthn/vendor/sop/crypto-types'
markdown: 'https://brendo.org/wp-content/plugins/two-factor-provider-webauthn/vendor/sop/crypto-types.md'
date: '2026-04-06'
description: 'CryptoTypes A PHP library of various ASN.1 types for cryptographic applications. Requirements PHP >=7.2 gmp sop/asn1 sop/crypto-encoding Features Asymmetric keys RSAPrivateKey, RSAPublicKey ECPrivateKey, ECPublicKey PrivateKeyInfo (PKCS #8) SubjectPublicKeyInfo (X.509) RSA and EC signat…'
---

# CryptoTypes

[![Build Status](https://travis-ci.org/sop/crypto-types.svg?branch=master)](https://travis-ci.org/sop/crypto-types)[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/sop/crypto-types/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/sop/crypto-types/?branch=master)[![Coverage Status](https://coveralls.io/repos/github/sop/crypto-types/badge.svg?branch=master)](https://coveralls.io/github/sop/crypto-types?branch=master)[![License](https://poser.pugx.org/sop/crypto-types/license)](https://github.com/sop/crypto-types/blob/master/LICENSE)

A PHP library of various ASN.1 types for cryptographic applications.

## Requirements

- PHP >=7.2
- gmp
- [sop/asn1](https://github.com/sop/asn1)
- [sop/crypto-encoding](https://github.com/sop/crypto-encoding)

## Features

- Asymmetric keys 
    - [`RSAPrivateKey`](https://tools.ietf.org/html/rfc2437#section-11.1.2), [`RSAPublicKey`](https://tools.ietf.org/html/rfc2437#section-11.1.1)
    - [`ECPrivateKey`](https://tools.ietf.org/html/rfc5915#section-3), [`ECPublicKey`](https://tools.ietf.org/html/rfc5480#section-2.2)
    - [`PrivateKeyInfo`](https://tools.ietf.org/html/rfc5208#section-5)([PKCS #8](https://tools.ietf.org/html/rfc5208))
    - [`SubjectPublicKeyInfo`](https://tools.ietf.org/html/rfc5280#section-4.1)([X.509](https://tools.ietf.org/html/rfc5280))
- [RSA](https://tools.ietf.org/html/rfc2313#section-10) and [EC](https://tools.ietf.org/html/rfc3278#section-8.2) signature types
- Various `AlgorithmIdentifier` types and their OID’s

## Installation

This library is available on [Packagist](https://packagist.org/packages/sop/crypto-types).

```
composer require sop/crypto-types
```

## License

This project is licensed under the MIT License.

---

## Navigation

- Previous: [Crypto-encoding](https://brendo.org/wp-content/plugins/two-factor-provider-webauthn/vendor/sop/crypto-encoding.md)
- Next: [X501](https://brendo.org/wp-content/plugins/two-factor-provider-webauthn/vendor/sop/x501.md)
