Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/01/2012, 18:45
juliochinchilla
 
Fecha de Ingreso: septiembre-2011
Mensajes: 12
Antigüedad: 12 años, 6 meses
Puntos: 0
Sonrisa Ingeniería Inversa en Lectura de Tarjeta comandos APDU

Hola una super duda, estoy decriptando un código que lee una tarjeta de identificación, hay un código que me gustaría que me explicaran, y es este


private static final byte[] c = { 0, -92, 4, 0, 16, -96, 0, 0, 0, 119, 1, 8, 0, 7, 16, 0, -15, 0, 0, 3, 0 };

private static final byte[] d = { 0, -53, 63, -1, 3, 92, 1, -62 };

private static final byte[] e = { 0, -92, 4, 12, 7, -96, 0, 0, 2, 71, 16, 1 };

private static final byte[] f = { 0, -92, 4, 12, 16, -96, 0, 0, 0, 119, 1, -125, -125, 8, 16, 0, -15, 0, 0, 0, 1, 0 };

private static final byte[] g = { 0, -92, 0, 0, 2, 63, 0, 0 };

private static final byte[] h = { 0, -92, 0, 0, 2, 16, 1, 0 };

private static final byte[] i = { 0, -92, 2, 0, 2, 1, 1, 0 };

private static final byte[] j = { 0, -92, 2, 0, 2, 1, 2, 0 };

private static final byte[] k = { 0, -80, 0, 0, 0 };

private static final byte[] l = { 0, -80, 0, -1, 0 };

private static final CommandAPDU m = new CommandAPDU(e);
private static final CommandAPDU n = new CommandAPDU(a);
private static final CommandAPDU o = new CommandAPDU(b);
private static final CommandAPDU p = new CommandAPDU(f);
private static final CommandAPDU q = new CommandAPDU(g);
private static final CommandAPDU r = new CommandAPDU(h);
private static final CommandAPDU s = new CommandAPDU(i);
private static final CommandAPDU t = new CommandAPDU(j);
private static final CommandAPDU u = new CommandAPDU(k);
private static final CommandAPDU v = new CommandAPDU(l);

private static final CommandAPDU w = new CommandAPDU(c);
private static final CommandAPDU x = new CommandAPDU(d);

private CardTerminal y = null;
private CardChannel z = null;

lo último del APDU si lo entiendo, pero lo coloqué para que se dieran una idea, mi duda es la siguiente:

¿Que significan realmente el array de bits en números negativos?

la documentación oficial de java acerca del comando apdu dice construirlo de esa manera, pero esos bytes, me gustaría saber como interpretarlos como posiciones en el chip de memoira, esta es la documentación oficial de java...
http://docs.oracle.com/javase/6/docs/jre/api/security/smartcardio/spec/javax/smartcardio/CommandAPDU.html

Pero solo me gustaría saber como interpretar eso de una manera más simple, es ingeniería inversa, si alguien ha trabajado con el javacard tendrá una idea mas clara =)