Skip to content

Commit

Permalink
Update README; disable digesting keys on nfast
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielle Madeley committed Jun 1, 2017
1 parent 19290f8 commit 40006dd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
27 changes: 15 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -158,40 +158,43 @@ Tested Compatibility
| Generate Random | Works | Works |
+-----------------------------+-----------+-----------------+
| Seed Random | Works | N/A |
+-----------------------------+-----------+-----------------+
| Digest (Data & Keys) | Works | Works [1]_ |
+--------+--------------------+-----------+-----------------+
| AES | Generate Key | Works | Works |
| +--------------------+-----------+-----------------+
| | Encrypt/Decrypt | Works | Works |
| +--------------------+-----------+-----------------+
| | Wrap/Unwrap | ? [1]_ | ? |
| | Wrap/Unwrap | ? [2]_ | ? |
| +--------------------+-----------+-----------------+
| | Sign/Verify | Works | Works [2]_ |
| | Sign/Verify | Works | Works [3]_ |
+--------+--------------------+-----------+-----------------+
| RSA | Generate Keypair | Works | Works [3]_ |
| RSA | Generate Keypair | Works | Works [4]_ |
| +--------------------+-----------+-----------------+
| | Encrypt/Decrypt | Works | Works |
| +--------------------+-----------+-----------------+
| | Wrap/Unwrap | Works | Works |
| +--------------------+-----------+-----------------+
| | Sign/Verify | Works | Works |
+--------+--------------------+-----------+-----------------+
| DH | Generate Keypair | Works | Partial [4]_ |
| DH | Generate Keypair | Works | Partial [5]_ |
| +--------------------+-----------+-----------------+
| | Derive Key | Works | Works [5]_ |
| | Derive Key | Works | Works [6]_ |
+--------+--------------------+-----------+-----------------+
| ECDH | Generate Keypair | Works | ? [1]_ |
| ECDH | Generate Keypair | Works | ? [2]_ |
| +--------------------+-----------+-----------------+
| | Derive Key | Works | ? [1]_ |
| | Derive Key | Works | ? [2]_ |
+--------+--------------------+-----------+-----------------+
| Proprietary extensions | N/A | Not implemented |
+--------+--------------------+-----------+-----------------+

.. [1] Untested: requires support in device.
.. [2] Default mechanism not supported, must provide alternative,
.. [1] Digesting keys is not supported.
.. [2] Untested: requires support in device.
.. [3] Default mechanism not supported, must provide alternative,
e.g. `Mechanism.AES_MAC`.
.. [3] Requires `Attribute.PUBLIC_EXPONENT`.
.. [4] Cannot store `DomainParameters` in session. Must be local.
.. [5] Generates security warnings about the derived key.
.. [4] Requires `Attribute.PUBLIC_EXPONENT`.
.. [5] Cannot store `DomainParameters` in session. Must be local.
.. [6] Generates security warnings about the derived key.
Python version:

Expand Down
4 changes: 3 additions & 1 deletion tests/test_digest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from pkcs11 import Mechanism, KeyType, Attribute

from . import TestCase
from . import TestCase, Not


class DigestTests(TestCase):
Expand All @@ -33,6 +33,7 @@ def test_digest_generator(self):

self.assertEqual(digest, m.digest())

@Not.nfast
def test_digest_key(self):
key = self.session.generate_key(KeyType.AES, 128,
store=False, template={
Expand All @@ -45,6 +46,7 @@ def test_digest_key(self):
self.assertEqual(digest,
hashlib.sha256(key[Attribute.VALUE]).digest())

@Not.nfast
def test_digest_key_data(self):
key = self.session.generate_key(KeyType.AES, 128,
store=False, template={
Expand Down

0 comments on commit 40006dd

Please sign in to comment.