removed warnings by sphinx due to invalid formatting
git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@608 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
@@ -190,18 +190,21 @@ class Security_Environment(object):
|
||||
P1 specifies the operation to perform, p2 is either the SEID for the
|
||||
referred SE or the tag of a control reference template
|
||||
|
||||
P1:
|
||||
b8 b7 b6 b5 b4 b3 b2 b1 Meaning
|
||||
- - - 1 - - - - Secure messaging in command data field
|
||||
- - 1 - - - - - Secure messaging in response data field
|
||||
- 1 - - - - - - Computation, decipherment, internal
|
||||
authentication and key agreement
|
||||
1 - - - - - - - Verification, encipherment, external
|
||||
authentication and key agreement
|
||||
- - - - 0 0 0 1 SET
|
||||
1 1 1 1 0 0 1 0 STORE
|
||||
1 1 1 1 0 0 1 1 RESTORE
|
||||
1 1 1 1 0 1 0 0 ERASE
|
||||
:param p1:
|
||||
== == == == == == == == ======================================
|
||||
b8 b7 b6 b5 b4 b3 b2 b1 Meaning
|
||||
== == == == == == == == ======================================
|
||||
- - - 1 - - - - Secure messaging in command data field
|
||||
- - 1 - - - - - Secure messaging in response data field
|
||||
- 1 - - - - - - Computation, decipherment, internal
|
||||
authentication and key agreement
|
||||
1 - - - - - - - Verification, encipherment, external
|
||||
authentication and key agreement
|
||||
- - - - 0 0 0 1 SET
|
||||
1 1 1 1 0 0 1 0 STORE
|
||||
1 1 1 1 0 0 1 1 RESTORE
|
||||
1 1 1 1 0 1 0 0 ERASE
|
||||
== == == == == == == == ======================================
|
||||
"""
|
||||
|
||||
cmd = p1 & 0x0F
|
||||
@@ -658,10 +661,8 @@ class Security_Environment(object):
|
||||
card, or accesses a key pair previously generated in the card.
|
||||
|
||||
:param p1: should be 0x00 (generate new key)
|
||||
:param p2:'00' (no information provided) or reference of the key to be \
|
||||
generated
|
||||
:param data: One or more CRTs associated to the key generation if P1-P2 \
|
||||
different from '0000'
|
||||
:param p2: '00' (no information provided) or reference of the key to be generated
|
||||
:param data: One or more CRTs associated to the key generation if P1-P2 different from '0000'
|
||||
"""
|
||||
|
||||
from Crypto.PublicKey import RSA, DSA
|
||||
@@ -712,4 +713,4 @@ class Security_Environment(object):
|
||||
#We do not support extended header lists yet
|
||||
raise SwError["ERR_NOTSUPPORTED"]
|
||||
else:
|
||||
return SW["NORMAL"], result
|
||||
return SW["NORMAL"], result
|
||||
|
||||
@@ -874,8 +874,7 @@ class MF(DF):
|
||||
Function for instruction 0x0e. Takes the parameter bytes 'p1', 'p2' as
|
||||
integers and 'data' as binary string.
|
||||
|
||||
:returns: the status bytes as two byte long integer and the response
|
||||
data as binary string.
|
||||
:returns: the status bytes as two byte long integer and the response data as binary string.
|
||||
"""
|
||||
ef, offsets, datalist = self.dataUnitsDecodePlain(p1, p2, data)
|
||||
# If INS = '0E', then, if present, the command data field encodes
|
||||
|
||||
@@ -37,10 +37,13 @@ class CryptoflexSE(Security_Environment):
|
||||
"""
|
||||
In the Cryptoflex card this command only supports RSA keys.
|
||||
|
||||
:param data: Contains the public exponent used for key generation
|
||||
:param p1: The key number. Can be used later to refer to the generated key \
|
||||
:param p2: Used to specify the key length. The mapping is: 0x40 => 256 \
|
||||
Bit, 0x60 => 512 Bit, 0x80 => 1024
|
||||
:param data:
|
||||
Contains the public exponent used for key generation
|
||||
:param p1:
|
||||
The key number. Can be used later to refer to the generated key
|
||||
:param p2:
|
||||
Used to specify the key length. The mapping is: 0x40 => 256 Bit,
|
||||
0x60 => 512 Bit, 0x80 => 1024
|
||||
"""
|
||||
from Crypto.PublicKey import RSA
|
||||
from Crypto.Util.randpool import RandomPool
|
||||
@@ -250,4 +253,4 @@ class CryptoflexMF(MF): # {{{
|
||||
self.current = file
|
||||
|
||||
return SW["NORMAL"], data
|
||||
# }}}
|
||||
# }}}
|
||||
|
||||
Reference in New Issue
Block a user