What do you mean by authentication code of blockchain?
If you mean message authentication code (MAC), you can share the code publicly. But it also requires to share the secret key used in the code generation to verify the code.
Dear Lei Xu, my question is about Authentication of a new node/block in blockchain to verify wheater new node who wants to join blockchain is benevolent or malicious.
There are lots of schemes for authentication... we don't know which scheme will be matched with your scenario... Especially you are working in Blockchain filed with Cooja simulator.
I think you should describe more the specifications of your project.
Zain ul Abadin Signature can be used to authenticate a user and his/her messages. But you have to consider the certificate management. Generally, you will need a PKI to support that.
For IoT, we generally assume it is computationally limited, you can search lightweight authentication, there should be a lot of candidates.