@@ -300,17 +300,22 @@ void send_ae_signature_replies(jade_process_t* process, signing_data_t* all_sign
300300 // We are expecting to generate a signature for this input
301301 GET_MSG_PARAMS (process );
302302
303- size_t ae_host_entropy_len = 0 ;
304303 const uint8_t * ae_host_entropy = NULL ;
305- rpc_get_bytes_ptr ( "ae_host_entropy" , & params , & ae_host_entropy , & ae_host_entropy_len ) ;
304+ size_t ae_host_entropy_len = 0 ;
306305
307- if (!ae_host_entropy || ae_host_entropy_len != WALLY_S2C_DATA_LEN ) {
308- jade_process_reject_message (
309- process , CBOR_RPC_BAD_PARAMETERS , "Failed to extract host entropy from parameters" , NULL );
310- goto cleanup ;
306+ if (sig_data -> segwit_ver != SEGWIT_V1 ) {
307+ // Non taproot signature: requires the host entropy to include
308+ // in the signature
309+ rpc_get_bytes_ptr ("ae_host_entropy" , & params , & ae_host_entropy , & ae_host_entropy_len );
310+
311+ if (!ae_host_entropy || ae_host_entropy_len != WALLY_S2C_DATA_LEN ) {
312+ jade_process_reject_message (
313+ process , CBOR_RPC_BAD_PARAMETERS , "Failed to extract host entropy from parameters" , NULL );
314+ goto cleanup ;
315+ }
311316 }
312317
313- // Generate Anti-Exfil signature
318+ // Generate Anti-Exfil or non-AE Schnorr signature
314319 if (!wallet_sign_tx_input_hash (sig_data , ae_host_entropy , ae_host_entropy_len )) {
315320 jade_process_reject_message (process , CBOR_RPC_INTERNAL_ERROR , "Failed to sign tx input" , NULL );
316321 goto cleanup ;
0 commit comments