Scroll to navigation

Authen::U2F::Tester::Keystore::Wrapped(3pm) User Contributed Perl Documentation Authen::U2F::Tester::Keystore::Wrapped(3pm)


Authen::U2F::Tester::Keystore::Wrapped - Wrapped Keystore for Authen::U2F::Tester


version 0.03


 my $key = Crypt::PK::ECC->new;
 my $keystore = Authen::U2F::Tester::Keystore->new(key => $key);
 my $keypair = Authen::U2F::Tester::Keypair->new;
 my $handle = $keystore->put($keypair->private_key);
 if ($keystore->exists($handle)) {
     my $pkec = $keystore->get($handle);


This is a "wrapped" key store for Authen::U2F::Tester. This is the default key store used by Authen::U2F::Tester. This key store does not require any backing storage at all to keep track of registered keys. Instead, it generates key handles by encrypting the private key using the tester's private key and returns this encrypted value as the key handle. This is somewhat vaguely describe in the FIDO/U2F specifications as a "wrapped" key handle. My experience is that most of the U2F devices out there use some variation of this scheme because it allows the devices to be used with an infinite number of services as no local storage is required on the U2F device.

Storage of the key handle is not required because this class can tell if the handle is valid or not by trying to decrypt the passed in key handle. If decryption succeeds, then the handle is valid. Otherwise, the handle is not valid.




The development version is on github at <http://> and may be cloned from <git://>


Please report any bugs or feature requests on the bugtracker website <>

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.


Michael Schout <>


This software is copyright (c) 2017 by Michael Schout.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2018-04-12 perl v5.26.1