هدف کلی از این تایپیک ساخت کیف پول بر پایه زبان VBA یا VB6 هست با توجه به دستوالعمل های سایت https://iancoleman.io/bip39/ از Mnemonic یا جمله 12 کلمه ای ایجاد شده میخواهیم آدرس های دریافت و ارسال انواع کوین ها (بیت کوین و اتریوم و ...) ایجاد کنیم برای این پروسه ، جمله ایجاد شده ("inform turkey still gasp click roof exhibit shoot zoo desert oak citizen") را طبق دستورالعمل تصویر زیر باید درون تابع pbfdk2 قرار بدیم تا پایه رمزگذاری را آغاز کنیم (عملیات ایجاد BIP39 Seed) : BIP39_Seed = crypt.PBKDF2(pw, pwCharset, hashAlg, saltHex, iterationCount, 512, enc)
در این تابع pw پسورد دلخواه + Mnemonic و pwCharset = "utf-8" و hashAlg الگوریتم هش برمبنای SHA512 و saltHex جمله Mnemonic و iterationCount تعداد دفعات تکرار تابع PBKDF2 و 512 طول عبارت خروجی تابع و enc هم نوع جمله خروجی بر پایه Hex یا Text
بر اساس این الگوریتم : (https://github.com/bitcoin/bips/blob...0039.mediawiki)
mnemonic to seed
A user may decide to protect their mnemonic with a passphrase. If a passphrase is not present, an empty string "" is used instead.
To create a binary seed from the mnemonic, we use the PBKDF2 function with a mnemonic sentence (in UTF-8 NFKD) used as the password and the string "mnemonic" + passphrase (again in UTF-8 NFKD) used as the salt. The iteration count is set to 2048 and HMAC-SHA512 is used as the pseudo-random function. The length of the derived key is 512 bits (= 64 bytes).
This seed can be later used to generate deterministic wallets using BIP-0032 or similar methods.
The conversion of the mnemonic sentence to a binary seed is completely independent from generating the sentence. This results in a rather simple code; there are no constraints on sentence structure and clients are free to implement their own wordlists or even whole sentence generators, allowing for flexibility in wordlists for typo detection or other purposes.
Although using a mnemonic not generated by the algorithm described in "Generating the mnemonic" section is possible, this is not advised and software must compute a checksum for the mnemonic sentence using a wordlist and issue a warning if it is invalid.
The described method also provides plausible deniability, because every passphrase generates a valid seed (and thus a deterministic wallet) but only the correct one will make the desired wallet available.
جوابی که از این دستورالعمل ذکر شده در سایت های آنلاین محاسبه pbkdf2 (https://stuff.birkenstab.de/pbkdf2/) و با کد vba زیر میگیریم هر دو یکی هست ولی در سایت https://iancoleman.io/bip39/ جواب متفاوته حالا از دوستان کسی هست علت رو پیدا کنه ؟
Private Sub Command5_Click()
Dim crypt As New ChilkatCrypt2
Dim success As Long
success = crypt.UnlockComponent("Anything for 30-day trial")
If (success <> 1) Then
Me.TXTDEC = TXTDEC & crypt.LastErrorText & vbCrLf
Exit Sub
End If
Dim hexKey As String
Dim pw As String
pw = "inform turkey still gasp click roof exhibit shoot zoo desert oak citizen"
Dim pwCharset As String
pwCharset = "utf-8"
Dim hashAlg As String
hashAlg = "sha512"
Dim saltHex As String
saltHex = crypt.EncodeString(pw, "utf-8", "hex")
Dim iterationCount As Long
iterationCount = 2048
Dim outputBitLen As Long
outputBitLen = 512
Dim enc As String
enc = "hex"
hexKey = crypt.PBKDF2(pw, pwCharset, hashAlg, saltHex, iterationCount, 512, enc)
MsgBox LCase(hexKey)
End Sub