Isn't DER format the same as raw byte ? Anyway I opened an other thread and Hal found out that the key has a "ASN.1 cruft" or something. So I add to add a tail -c 64.
I have to read about this ASN thing.
Glad your problem got solved. Out of curiosity what are you planning to use the extracted key for?
I want to implement an exchange system where owners are identified by a bitcoin address.
So in order to transfer an asset to an other person, one just has to sign (with the bitcoin address key) the new bitcoin address.
The advantage is that if the asset is a bond or a shareholding, paiements of dividends or coupons can be done on the bitcoin address.