# 8. Signature and Verification

## 1. Data Signature Description <a href="#id-1-data-signature-description" id="id-1-data-signature-description"></a>

1. Arrange non-empty parameters (sign does not participate in signing) in lexicographic-order.
2. After sorting, param1=val1\&param2=val2… format splicing to get string1.
3. Sign with SHA256withRSA algorithm and merchant private key.
4. Note that only non-empty parameters participate in the signature, and parameters whose val is an empty string are also regarded as effective parameters.

## 2. Verification Description <a href="#id-2-verification-description" id="id-2-verification-description"></a>

1. Arrange non-empty parameters (sign does not participate in signing) in lexicographic-order.
2. After sorting, param1=val1\&param2=val2… format splicing to get string1.
3. Use SHA256withRSA algorithm and platform public key for signature verification.
4. Note that only non-empty parameters participate in the signature verification, and parameters whose val is an empty string are also regarded as effective parameters.
