## 3 Scheme Design
### Attribute Encryption of Address Information
#### 3.4.3 Decryption  
The secret key can only be decrypted if the set of attributes \(S\) of the secret key is sufficient to satisfy the secret access tree \(T\). Suppose the overlapping attribute among the attributes of the leaf nodes of \(T\) and the attributes of the \(S\) set is \(i\); then, compute \(P_{i}\), as shown in Equation (12). \[P_{i}=e(\mathrm{C}_{i}^{1},D_{0})e(\mathrm{C}_{i}^{2},D_{i})=e(g,g)^{t\lambda_ {i}\beta} \tag{12}\]  
Starting from the root node, perform the recursive calculation. Eventually, the secret value of the root node can be recovered in the form of \(e(g,g)^{\beta ts}\). \[e(\mathrm{C}_{0},D)=e(g,g)^{\alpha s}e(g,g)^{\beta ts} \tag{13}\] \begin{table}
\begin{tabular}{c c} \hline \hline
**Notation** & **Descriptive** \\ \hline \(C,\mathrm{C}_{0},\mathrm{C}_{i}^{1},\mathrm{C}_{i}^{2}\) & Plaintext encryption \\ \(D,\mathrm{D}_{0},\mathrm{D}_{i}\) & Random number calculation private key \\ \(\mathrm{G}_{1},\mathrm{G}_{T}\) & Random group element \\ \(\alpha,\beta\) & Random integers \\ \(e\) & The public parameters \\ \(g\) & The public parameters \\ \(Z_{r}\) & Set of integers \\ \(Y\) & Random number calculation public key \\ \(pk\) & The public key \\ \(sk\) & The private key \\ \(t\) & Random number \\ \(M\) & Plaintext message \\ \(H\) & Plaintext is mapped to a shorter binary string \\ \(ct\) & Standardized ciphertext \\ \(S\) & Secret key attribute collection \\ \(T\) & Standardized access control tree \\ \(i\) & Leaf node attributes \\ \(\lambda_{i}\) & Secret slice corresponding to \(i\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Symbol descriptions. In order to get the ciphertext, calculate \(e(C_{0},D)\), as shown in Equation (13). Then, further derive \(e(g,g)^{as}\), as shown in Equation (14). \[e(g,g)^{as}=e(C_{0},D)/e(g,g)^{\beta ts} \tag{14}\]  
Finally, the plaintext \(M\) is obtained, as shown in Equation (15). \[M=C/e(g,g)^{as} \tag{15}\]  
The algorithm is based on the secret sharing matrix access structure and each piece of user data corresponds to an access control policy. Consequently, visitors possessing disparate attributes are accorded divergent access privileges to data, resulting in variances in the scope of data information to which they are granted access. Unauthorized logistics insiders cannot further access the information, thereby preventing unauthorized personnel from accessing the information and avoiding leakage of internal information. In the preliminary phase, the logistics company generates the CP-ABE encryption public key \(Pk\) and master key \(Mk\), which are periodically replaced after a certain duration of use. Logistics companies employ various attribute strategies to encrypt the attributes of these segments, based on the planned delivery route for the logistics information. Initially, the logistics company utilizes the private key to decipher the message transmitted by the sender, which contains the user's address information. Subsequently, a viable delivery route is planned, considering the company's express transportation routes and transfer station conditions together with the logistics information encrypted using key encapsulation based on ciphertext policy attributes. Upon the package reaching the courier, the following operations are conducted: scanning to acquire the package and uploading the package alongside its corresponding attribute set. Subsequently, the terminal searches for the package and associates the encrypted logistics information to ascertain whether the attribute set uploaded by the courier aligns with the access tree \(T\). If the access policy is met, the ciphertext \(CT\) of the logistics information is sent to the courier. The courier uses the private key \(sk\) to decrypt the plaintext \(M\) of the logistics information. The courier decrypts the ciphertext, thereby accessing the logistics information, which includes the phone numbers and precise logistics addresses of both the sender and the recipient. With this information at hand, the courier is able to perform precise and accurate logistics delivery.