How does Mastodon perform password encryption?


I and my coworker are working on our master thesis which consists to build a proof of concept of a solution to the migration issue. Our approach is to use Hyperledger Fabric as a distributed database between instances and at the moment we are trying a basic solution where we store login information to sign up on one instance and log in from another.

The problem is that we are beginners with Rails app and despite following some tutorials, Gems make it difficult for us to apply what we learned. We dug into the code but we can not figure out how passwords are encrypted in Mastodon using Devise gem. Do you have some resources which explain this process?

Thanks for your help.