This commit is contained in:
iceman1001 2017-12-27 10:34:51 +01:00
commit 7d25ab4561
11 changed files with 17 additions and 24 deletions

View file

@ -22,7 +22,7 @@
* *
* This is free software: you can redistribute it and/or modify * This is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as published * it under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation. * by the Free Software Foundation, or, at your option, any later version.
* *
* This file is distributed in the hope that it will be useful, * This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -33,7 +33,6 @@
* along with loclass. If not, see <http://www.gnu.org/licenses/>. * along with loclass. If not, see <http://www.gnu.org/licenses/>.
* *
* *
*
****************************************************************************/ ****************************************************************************/

View file

@ -22,7 +22,7 @@
* *
* This is free software: you can redistribute it and/or modify * This is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as published * it under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation. * by the Free Software Foundation, or, at your option, any later version.
* *
* This file is distributed in the hope that it will be useful, * This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -33,7 +33,6 @@
* along with loclass. If not, see <http://www.gnu.org/licenses/>. * along with loclass. If not, see <http://www.gnu.org/licenses/>.
* *
* *
*
****************************************************************************/ ****************************************************************************/

View file

@ -22,7 +22,7 @@
* *
* This is free software: you can redistribute it and/or modify * This is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as published * it under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation. * by the Free Software Foundation, or, at your option, any later version.
* *
* This file is distributed in the hope that it will be useful, * This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -33,7 +33,6 @@
* along with loclass. If not, see <http://www.gnu.org/licenses/>. * along with loclass. If not, see <http://www.gnu.org/licenses/>.
* *
* *
*
****************************************************************************/ ****************************************************************************/
#include <stdint.h> #include <stdint.h>
@ -280,6 +279,7 @@ int testReversedBitstream()
return 0; return 0;
} }
int testCipherUtils(void) int testCipherUtils(void)
{ {
prnlog("[+] Testing some internals..."); prnlog("[+] Testing some internals...");

View file

@ -22,7 +22,7 @@
* *
* This is free software: you can redistribute it and/or modify * This is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as published * it under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation. * by the Free Software Foundation, or, at your option, any later version.
* *
* This file is distributed in the hope that it will be useful, * This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -33,7 +33,6 @@
* along with loclass. If not, see <http://www.gnu.org/licenses/>. * along with loclass. If not, see <http://www.gnu.org/licenses/>.
* *
* *
*
****************************************************************************/ ****************************************************************************/

View file

@ -22,7 +22,7 @@
* *
* This is free software: you can redistribute it and/or modify * This is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as published * it under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation. * by the Free Software Foundation, or, at your option, any later version.
* *
* This file is distributed in the hope that it will be useful, * This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -232,15 +232,15 @@ void hash2(uint8_t *key64, uint8_t *outp_keytable)
// Once again, key is on iclass-format // Once again, key is on iclass-format
desencrypt_iclass(key64, key64_negated, z[0]); desencrypt_iclass(key64, key64_negated, z[0]);
prnlog("\nHigh security custom key (Kcus):"); // prnlog("\nHigh security custom key (Kcus):");
printvar("z0 ", z[0],8); // printvar("z0 ", z[0],8);
uint8_t y[8][8]={{0},{0}}; uint8_t y[8][8]={{0},{0}};
// y[0]=DES_dec(z[0],~key) // y[0]=DES_dec(z[0],~key)
// Once again, key is on iclass-format // Once again, key is on iclass-format
desdecrypt_iclass(z[0], key64_negated, y[0]); desdecrypt_iclass(z[0], key64_negated, y[0]);
printvar("y0 ", y[0],8); // printvar("y0 ", y[0],8);
for (i=1; i<8; i++) { for (i=1; i<8; i++) {
// z [i] = DES dec (rk(K cus , i), z [i1] ) // z [i] = DES dec (rk(K cus , i), z [i1] )

View file

@ -22,7 +22,7 @@
* *
* This is free software: you can redistribute it and/or modify * This is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as published * it under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation. * by the Free Software Foundation, or, at your option, any later version.
* *
* This file is distributed in the hope that it will be useful, * This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -33,7 +33,6 @@
* along with loclass. If not, see <http://www.gnu.org/licenses/>. * along with loclass. If not, see <http://www.gnu.org/licenses/>.
* *
* *
*
****************************************************************************/ ****************************************************************************/

View file

@ -22,7 +22,7 @@
* *
* This is free software: you can redistribute it and/or modify * This is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as published * it under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation. * by the Free Software Foundation, or, at your option, any later version.
* *
* This file is distributed in the hope that it will be useful, * This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -33,7 +33,6 @@
* along with loclass. If not, see <http://www.gnu.org/licenses/>. * along with loclass. If not, see <http://www.gnu.org/licenses/>.
* *
* *
*
****************************************************************************/ ****************************************************************************/
#ifndef ON_DEVICE #ifndef ON_DEVICE

View file

@ -22,7 +22,7 @@
* *
* This is free software: you can redistribute it and/or modify * This is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as published * it under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation. * by the Free Software Foundation, or, at your option, any later version.
* *
* This file is distributed in the hope that it will be useful, * This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -33,7 +33,6 @@
* along with loclass. If not, see <http://www.gnu.org/licenses/>. * along with loclass. If not, see <http://www.gnu.org/licenses/>.
* *
* *
*
****************************************************************************/ ****************************************************************************/
#ifndef FILEUTILS_H #ifndef FILEUTILS_H

View file

@ -22,7 +22,7 @@
* *
* This is free software: you can redistribute it and/or modify * This is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as published * it under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation. * by the Free Software Foundation, or, at your option, any later version.
* *
* This file is distributed in the hope that it will be useful, * This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -33,10 +33,11 @@
* along with loclass. If not, see <http://www.gnu.org/licenses/>. * along with loclass. If not, see <http://www.gnu.org/licenses/>.
* *
* *
*
****************************************************************************/ ****************************************************************************/
/** /**
From "Dismantling iclass": From "Dismantling iclass":
This section describes in detail the built-in key diversification algorithm of iClass. This section describes in detail the built-in key diversification algorithm of iClass.
Besides the obvious purpose of deriving a card key from a master key, this Besides the obvious purpose of deriving a card key from a master key, this

View file

@ -22,7 +22,7 @@
* *
* This is free software: you can redistribute it and/or modify * This is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as published * it under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation. * by the Free Software Foundation, or, at your option, any later version.
* *
* This file is distributed in the hope that it will be useful, * This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -33,7 +33,6 @@
* along with loclass. If not, see <http://www.gnu.org/licenses/>. * along with loclass. If not, see <http://www.gnu.org/licenses/>.
* *
* *
*
****************************************************************************/ ****************************************************************************/
#ifndef IKEYS_H #ifndef IKEYS_H

View file

@ -22,7 +22,7 @@
* *
* This is free software: you can redistribute it and/or modify * This is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as published * it under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation. * by the Free Software Foundation, or, at your option, any later version.
* *
* This file is distributed in the hope that it will be useful, * This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -33,7 +33,6 @@
* along with loclass. If not, see <http://www.gnu.org/licenses/>. * along with loclass. If not, see <http://www.gnu.org/licenses/>.
* *
* *
*
****************************************************************************/ ****************************************************************************/