## 3 Scheme Design
### Attribute Encryption of Address Information  
Access control serves as a vital security mechanism in logistics transportation, safeguarding logistics information from unauthorized access by illegitimate users as well as establishing specific access rights so that only authorized users can access the information. Traditional access control schemes, primarily reliant on user identification, often suffer from inflexibility, coarse granularity, and inadequate security due to their static allocation of rights.  
The scheme employs ciphertext policy attribute-based encryption (CP-ABE) to encrypt the address to hide the sender and receiver information, which can allow data leakage caused by internal intrusion to be resisted and thus improve identity privacy protection.  
The attribute structure encompasses location attributes, time attributes, and access attributes. In the encryption process of logistics information, the geographical location coordinates serve as the location attribute, the courier's regular working hours serve as the time attribute, and the courier's authorized identity serves as the access attribute. Consequently, this system guarantees that only couriers situated in the correct geographical location during the designated working hours and possessing the appropriate access rights can acquire the decryption key for decrypting the information.  
This encryption algorithm refines access granularity to the attribute level, formulating access control policies based on the attributes of the authorized group. By integrating these attributes into the user's private key, the shared data is encrypted into ciphertext. This algorithm incorporates authorization group attributes into shared data and private keys. Therefore, it can be ensured that only users whose attributes meet the requirements of the access control policy can decrypt the ciphertext and access the shared data, as shown in Algorithm 6.  
```
0: Node[] accessTree,plaintext,userAttList Output: Node[] nodes,delivery result Initialization \(\triangleright\) generate parameters Generate swarm elements \(g\) Generate random number \(\alpha\) and \(\beta\) Keygen \(\triangleright\) calculate the private key mskProp\(\leftarrow\)\(g^{\alpha}\) pkProp\(\leftarrow\)\((g,g^{\beta},e(gg)^{\alpha})\) Generate random elements \(t\) skProp\(\leftarrow\)\((g^{\alpha}g^{\beta t},g^{t})\) for userAttList do  Each attribute i of attList in the user attribute list if\(D_{i}=H(i)^{t}\)then  skProp\(\leftarrow\)\((D,D_{0},D_{i})\) endif endfor  Encrypt \(\leftarrow\) Node[] accessTree \(\triangleright\) encrypted plaintext Generate random number \(s\)\(\triangleright\)\(s\) is the shared secret value Calculate the ciphertext component C Plaintext M \(\in\) G \(C=Me(g,g)^{as}\) \(C_{0}=g^{s}\)  Each node gets the corresponding secret slice for Node[] accessTree do if is Leafnode then  Choose a random number \(r\)  Calculate \(C_{i}^{1},C_{i}^{2}\)  ciphertext \(ct\)=\((C,C_{0}(C_{i}^{1},C_{i}^{2}))\) endif endfor  Decrypt \(\leftarrow\) Node[] accessTree \(\triangleright\) Only when the key attribute set satisfies the ciphertext access tree can it be decrypted  Load ciphertext, private key for Node[] accessTree do  Overlapping attributes in the key attribute set \(S\) and the leaf node \(T\) set, calculate \(P_{i}\) if Recovery succeeded then  calculate \(e(gg)^{as}\)  Plaintext M \(\leftarrow\) C/e(gg)^{as} endif endfor
```  
**Algorithm 6** Encryption algorithm