Bitcoin Forum
June 22, 2024, 08:31:02 AM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: DB Dump translation py script  (Read 78 times)
MikeJ_NpC (OP)
Member
**
Offline Offline

Activity: 107
Merit: 10

if you want to lie *cough*use your data; not mine.


View Profile
October 05, 2022, 08:42:32 PM
 #1

Hello.. is there a py script that someone can point me do which translates the following

 "type": "unencrypted private key",
    "OpenSSL EVP DER-encoded serialized private key": "3081d302010104205ac70fdbcb5c4949935ad3b7374035a8dcc5ba2216f8df5f81d7cf861b2e0b6 ba08185308182020101302c06072a8648ce3d0101022100ffffffffffffffffffffffffffffffff fffffffffffffffffffffffefffffc2f300604010004010704210279be667ef9dcbbac55a06295c e870b07029bfcdb2dce28d959f2815b16f81798022100fffffffffffffffffffffffffffffffeba aedce6af48a03bbfd25e8cd0364141020101a12403220003ffb02fbbeb154159373687c798edced 6e057e401984d5cd744cbfca5b0f24c58",
    "sha256 hash of compressed public key and private key": "0dd64a6fa5870c5548e0b95c9828080bc0d7d3b18efdabacbddca0266936aa13"
  }
 
and

value d63081d30201010420fdd2d32c14360c6354874320bca7c32a382a6dc8c51f10a4534f19fe5c3cb b31a08185308182020101302c06072a8648ce3d01010221
*damaged key -- 01cb91c5aef56c7678cc1c3ef402
value d63081d3020101042076c27e0b3ea7af1186fc2e1a77f51d2d6b6df37b8aeddbca35caeef72809f 574a08185308182020101302c06072a8648ce3d01010221
key 029af47e1909a5effc0738962252baeb2eae131e9d7672e5b8eea28f2bd93476
value d63081d3020101042081120e32065d2a4420de64a096eff052e4a7b40754bd52e429a72f607cfed 4bca08185308182020101302c06072a8648ce3d01010221

Thank you...
Smiley


If Karma is a bitch, then god is a woman. I ask to know, not to be screwed or hear trite excuses (after the fact) which a 3rd grader could do better on. If you give your word, keep it atleast..
odolvlobo
Legendary
*
Offline Offline

Activity: 4354
Merit: 3273



View Profile
October 05, 2022, 11:43:23 PM
 #2

You must provide more context. Where do these come from?

Here is what the DER-encoded private key decodes to:

SEQUENCE (4 elem)
  INTEGER 1
  OCTET STRING (32 byte) 5AC70FDBCB5C4949935AD3B7374035A8DCC5BA2216F8DF5F81D7CF861B2E0B6B
  [ 0 ] (1 elem)
    SEQUENCE (6 elem)
      INTEGER 1
      SEQUENCE (2 elem)
        OBJECT IDENTIFIER 1.2.840.10045.1.1 prime-field (ANSI X9.62 field type)
        INTEGER (256 bit) 1157920892373161954235709850086879078532699846656405640394575840079088…
      SEQUENCE (2 elem)
        OCTET STRING (1 byte) 00
        OCTET STRING (1 byte) 07
      OCTET STRING (33 byte) 0279BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798
      INTEGER (256 bit) 1157920892373161954235709850086879078528375642790749043826051631415181…
      INTEGER 1
  [ 1 ] (1 elem)
    BIT STRING (264 bit) 0000001111111111101100000010111110111011111010110001010101000001010110…

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
NotATether
Legendary
*
Offline Offline

Activity: 1638
Merit: 6909


bitcoincleanup.com / bitmixlist.org


View Profile WWW
October 06, 2022, 07:08:13 AM
Merited by ABCbits (1)
 #3

Bitcoin private keys are not DER-encoded, they are encoded in WIF format and Base58...

What you have showed us is data for a different kind of (OpenSSL) private key.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!