OXIESEC PANEL
- Current Dir:
/
/
opt
/
gsutil
/
third_party
/
pyu2f
/
pyu2f
/
__pycache__
Server IP: 2a02:4780:11:1594:0:ef5:22d7:a
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/11/2025 08:19:48 AM
rwxr-xr-x
📄
__init__.cpython-39.pyc
198 bytes
02/11/2025 08:19:48 AM
rw-r--r--
📄
apdu.cpython-39.pyc
3.77 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
errors.cpython-39.pyc
3.16 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
hardware.cpython-39.pyc
5.12 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
hidtransport.cpython-39.pyc
9.66 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
model.cpython-39.pyc
2.44 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
u2f.cpython-39.pyc
5.49 KB
02/11/2025 08:19:48 AM
rw-r--r--
Editing: hardware.cpython-39.pyc
Close
a ��aC � @ s8 d Z ddlZddlmZ ddlmZ G dd� de�ZdS )z�This module implements the low level device API. This module exposes a low level SecurityKey class, representing the physical security key device. � N)�apdu)�errorsc @ sR e Zd ZdZdd� Zdd� Zddd�Zd d � Zdd� Zd d� Z dd� Z dd� ZdS )�SecurityKeyz�Low level api for talking to a security key. This class implements the low level api specified in FIDO U2F for talking to a security key. c C s || _ d| _t�d�| _d S )NFzpyu2f.hardware)� transport�use_legacy_format�logging� getLogger�logger)�selfr � r �//opt/gsutil/third_party/pyu2f/pyu2f/hardware.py�__init__! s zSecurityKey.__init__c C s` | j �d� t|�dks$t|�dkr,t�� �t|| �}| �t�dtj dd|��}|� � |jS )a2 Register security key. Ask the security key to register with a particular origin & client. Args: challenge_param: Arbitrary 32 byte challenge string. app_param: Arbitrary 32 byte applciation parameter. Returns: A binary structure containing the key handle, attestation, and a signature over that by the attestation key. The precise format is dictated by the FIDO U2F specs. Raises: TUPRequiredError: A Test of User Precense is required to proceed. ApduError: Something went wrong on the device. �CmdRegister� r � )r �debug�lenr �InvalidRequestError� bytearray�InternalSendApdur �CommandApduZCMD_REGISTER�CheckSuccessOrRaise�body)r �challenge_param� app_paramr �responser r r r &