How to perform APDU command for External Authentication for Setcos 4.3.0 card

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to perform APDU command for External Authentication for Setcos 4.3.0 card

Mohd Nor Haizam
Hi everybody,
 
1) My purppose is to update serial number in the smart card. This is the header for binary file serial number
 
Header : 6F 18 81 2 0 37 82 1 1 83 2 50 32 85 3 1 0 0 86 6 0 40 F0 F0 F0 F0
 
I send get response command to see the file content which is card serial number:
 
Content : FF FF FF FF FF FF FF FF FF FF
 
To update the serial number, 1st we must do the external authentication using Ask Random / Get Challenge command to get random number followed by External Authentication command. After the authentication success, we can do Update Binary command to update the serial number.
 
The problem is, i don't know how to send the encrypted random number by External Authentication command. How to encrypt that random number?How to obtain the key for encryption?
 
TQ.
 
 
Regards,
 

  Mohd Nor Haizam Bin Samsun Baharun
 
--
Mr Mohd Nor Haizam Bin Samsun Baharun
Programmer
Digicert Sdn Bhd
Lot 2-1 Enterprise 1
Technology Park Malaysia
www.digicert.com.my
tel: +603 899 61600
fax: +603 899 61054

_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to perform APDU command for External Authentication for Setcos 4.3.0 card

Stef Hoeben
Hi,

it's no default OpenSC stuff, so you'll have to do it yourself, I'm afraid:

You'll need a description on how the external authentication command works,
so you'll probably have to find the specs of the card somewhere.

Then you'll have to implement this mechanism (it usually involves some DES
operations, you might have a look at crd-gpk.c).

You'll have need to know the secret key that's needed for the external
auth...

Good luck,
Stef

Mohd Nor Haizam wrote:

> Hi everybody,
>  
> 1) My purppose is to update serial number in the smart card. This is
> the header for binary file serial number
>  
> Header : 6F 18 81 2 0 37 82 1 1 83 2 50 32 85 3 1 0 0 86 6 0 40 F0 F0
> F0 F0
>  
> I send get response command to see the file content which is card
> serial number:
>  
> Content : FF FF FF FF FF FF FF FF FF FF
>  
> To update the serial number, 1st we must do the external
> authentication using Ask Random / Get Challenge command to get random
> number followed by External Authentication command. After the
> authentication success, we can do Update Binary command to update the
> serial number.
>  
> The problem is, i don't know how to send the encrypted random number
> by External Authentication command. How to encrypt that random
> number?How to obtain the key for encryption?
>  
> TQ.
>  
>  
> Regards,
>  
>
>   Mohd Nor Haizam Bin Samsun Baharun
>  
> --
> Mr Mohd Nor Haizam Bin Samsun Baharun
> Programmer
> Digicert Sdn Bhd
> Lot 2-1 Enterprise 1
> Technology Park Malaysia
> www.digicert.com.my <http://www.digicert.com.my>
> tel: +603 899 61600
> fax: +603 899 61054
>
>------------------------------------------------------------------------
>
>_______________________________________________
>opensc-devel mailing list
>[hidden email]
>http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel
>

_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel