<p></p>
<p><a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/ghubstan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ghubstan">@ghubstan</a><br>
Regarding wallet encryption (not sure if already resolved, have not read the full thread...):</p>
<p>If wallet is encrypted you need the aesKey (or generate it from the password) for certain wallet methods. Bisq does not decrypt/encrypt but requests from the user the password to get the aesKey. Encrypting and decrypting is only done when setting or removing the wallet password.<br>
The wallet write operation has a certain risk for disk failure and when setting the  password we delete all the rolling backups (as seed would be visible in unencrypted files), so that could be a critical problem if the write operation fails and causes a corrupted wallet (I read on BitcoinJ mailinglist that this happened sometimes). So the encryption/decryption operations should be done only when absolutely needed IMO.</p>
<p>Side note:<br>
If the wallet is encrypted Bisq keeps the aesKey in memory to be able to sign a tx in case a taker takes an offer (which happenes non-interactive). This might be a bit of a security risk and it would be better if we do that only when absolutely needed (e.g. in case a maker has open offers).</p>
<p>I am not sure about your use cases for the API but passing the wallet password if required for the wallet operation seems to me the right way to deal with it.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/4214#issuecomment-630497511">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNWX7QSX6SL5Z7QNZQLRSHEKXANCNFSM4MUIOB4Q">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNXVK6VG6ZF6BMJQ763RSHEKXA5CNFSM4MUIOB42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEWKKBZY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/4214#issuecomment-630497511",
"url": "https://github.com/bisq-network/bisq/pull/4214#issuecomment-630497511",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>