Selecting an algorithm and key for Java Card encryption
I would focus on eliminating the inner switch statements.  You could try to eliminate the outer switch as well, but it's probably not worthwhile, especially for a resource-constrained environment.

byte[][] desKeys = new byte[][] {
    null, DESKey1, DESKey2, DESKey3, DESKey4
};

try {
    switch (buf[ISO7816.OFFSET_P1]) {
      case 0x01:
        doSingleDES(apdu, desKeys[buf[ISO7816.OFFSET_P2]]);
        return;
      case 0x02:
        doEncrypt(apdu, desKeys[buf[ISO7816.OFFSET_P2]]);
        return;
      default:
        ISOException.throwIt(ISO7816.SW_INCORRECT_P1P2);
    }
} catch (ArrayIndexOutOfBoundsException badP2) {
    ISOException.throwIt(ISO7816.SW_INCORRECT_P1P2);
}