As the rapid advancement of information technology, the importance of digital educational resources in the field of education has become increasingly prominent. However, traditional access control techniques can hardly meet the demand for fine-grained sharing of digital educational resources in complex educational environments. Therefore, the study adopts attribute-based encryption based on ciphertext policy and combines it with the decentralised and tamper-proof features of blockchain to design a secure sharing model combining blockchain technology and attribute-based encryption algorithms to achieve secure and precisely controlled sharing of digital educational resources. The outcomes denote that the average encryption and decryption time of the designed model were 1.66 s and 1.65 s, respectively. Compared with attribute based key policy encryption and policy based attribute based encryption, the average encryption time was reduced by 0.65 s and 2.61 s, respectively, and the average decryption time was reduced by 0.69 s and 2.04 s, respectively, proving that it is more efficient in processing tasks. The ciphertext upload time of the design model remains constant at 9.2 ms, proving that it can scale better to more users without increasing the latency. Meanwhile, as the amount of attributes increases, the design model is able to keep the ciphertext length small, proving that it can effectively reduce the storage space requirement and raise the overall efficiency of the system. The model provides a powerful solution to the data sharing problem in smart education, as well as a reference for other domains that require secure data sharing. © 2024 Slovene Society Informatika. All rights reserved.