Skip to content

Instantly share code, notes, and snippets.


Dirk Jäckel biafra23

View GitHub Profile


View Verifying my Peepeth
Verifying my identity on 0xe86935943315293154c7ad63296b4e1adac76364
View testnet-rinkeby-nexus5
View MessageDigest
private byte[] getDigestExtra(String toBeSigned, byte[] extra) throws NoSuchProviderException {
MessageDigest md = null;
try {
md = MessageDigest.getInstance("SHA1", "BC");
for (byte b : toBeSigned.getBytes()) {
System.out.println("b: " + Hex.toHexString(new byte[]{b}));
for (byte b : extra) {
System.out.println("b: " + Hex.toHexString(new byte[]{b}));
View Create EC Signature
Signature signer = Signature.getInstance(Signature.ALG_ECDSA_SHA, false);
signer.init(cardPrivateKey, Signature.MODE_SIGN);
byte[] sigBuffer = new byte[100];
short size = signer.sign(buffer, offset, length, sigBuffer, (short) 0);
byte[] result = new byte[size];
Util.arrayCopyNonAtomic(sigBuffer, (short) 0, result, (short) 0, size);
return result;

Keybase proof

I hereby claim:

  • I am biafra23 on github.
  • I am dirkjaeckel ( on keybase.
  • I have a public key whose fingerprint is 1C66 76AF 8572 DDE3 623B 7880 A258 970F A53E 4591

To claim this, I am signing this object: