kopia lustrzana https://github.com/solokeys/solo1
Use our cifra fork, rename command, keep room for sha256
rodzic
0c296bba30
commit
a6673b0917
|
@ -15,4 +15,4 @@
|
|||
url = https://github.com/solokeys/dfuse-tool
|
||||
[submodule "crypto/cifra"]
|
||||
path = crypto/cifra
|
||||
url = https://github.com/ctz/cifra.git
|
||||
url = https://github.com/solokeys/cifra.git
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "log.h"
|
||||
#include "extensions.h"
|
||||
|
||||
// move custom HASH512 command out,
|
||||
// move custom SHA512 command out,
|
||||
// and the following headers too
|
||||
#include "sha2.h"
|
||||
#include "crypto.h"
|
||||
|
@ -726,15 +726,15 @@ uint8_t ctaphid_handle_packet(uint8_t * pkt_raw)
|
|||
break;
|
||||
#endif
|
||||
#if defined(SOLO_HACKER)
|
||||
case CTAPHID_HASH512:
|
||||
case CTAPHID_SHA512:
|
||||
// some random logging
|
||||
printf1(TAG_HID,"CTAPHID_HASH512\n");
|
||||
printf1(TAG_HID,"CTAPHID_SHA512\n");
|
||||
// initialise CTAP response object
|
||||
ctap_response_init(&ctap_resp);
|
||||
// initialise write buffer
|
||||
ctaphid_write_buffer_init(&wb);
|
||||
wb.cid = cid;
|
||||
wb.cmd = CTAPHID_HASH512;
|
||||
wb.cmd = CTAPHID_SHA512;
|
||||
wb.bcnt = CF_SHA512_HASHSZ; // 64 bytes
|
||||
// calculate hash
|
||||
crypto_sha512_init();
|
||||
|
|
|
@ -28,7 +28,8 @@
|
|||
#define CTAPHID_ENTERBOOT (TYPE_INIT | 0x51)
|
||||
#define CTAPHID_ENTERSTBOOT (TYPE_INIT | 0x52)
|
||||
#define CTAPHID_GETRNG (TYPE_INIT | 0x60)
|
||||
#define CTAPHID_HASH512 (TYPE_INIT | 0x70)
|
||||
#define CTAPHID_SHA256 (TYPE_INIT | 0x70) // not implemented
|
||||
#define CTAPHID_SHA512 (TYPE_INIT | 0x71)
|
||||
|
||||
#define ERR_INVALID_CMD 0x01
|
||||
#define ERR_INVALID_PAR 0x02
|
||||
|
|
Ładowanie…
Reference in New Issue