Some APDU commands in OpenPGPApplet
Posted: Sat Nov 28, 2015 6:06 am
The following APDU commands is the result of my learning applet, it's contains:
1. All the types of RSA signature data length, it can be any length.
2. Generate three types of Key Pair
3. Encrpt and Decrypt commands
1. All the types of RSA signature data length, it can be any length.
2. Generate three types of Key Pair
3. Encrpt and Decrypt commands
Code: Select all
//select
00A4040010D276000124010200000600000001000000;
//verify pw3
00200083083132333435363738;
//Generate sig_key Key Pair
0047800001b6;
//Get remain data
//00C000000F;
//verify pw1
0020008106313233343536;
//Compute Signature
002a9e9a051122334455;
00C0000001;
//verify pw1
0020008106313233343536;
//Compute Signature
002a9e9a10000102030405060708090A0B0C0D0E0F;
00C0000001;
//verify pw1
0020008106313233343536;
//Compute Signature
002a9e9aF50102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F808182838485868788898A8B8C8D8E8F909192939495969798999A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBFC0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDFE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5;
00C0000001;
//verify pw1
0020008106313233343536;
//Compute Signature
002a9e9a0101;
00C0000001;
//verify pw1
0020008106313233343536;
//Compute Signature
002a9e9aF50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001;
00C0000001;
//verify pw1
0020008206313233343536;
//GENERATE auth_key Key Pair
0047800001a4;
00C000000F;
//encrpt
8088000006112233445566;
00C00001;
//Generate dec_key Key Pair
0047800001b8;
00C000000F;
//decrypt
102A8186 + lc + encrypted data part1;
102A8086 + lc + encrypted data part2;
802A808600;
//Put Data 80DATag+Lc+data
80DA7F2106010203040506;
//Get data. 80CA + Tag +00
80CA7F2100;