Sign [Q] What password phrase is used for decryption in Android?

Hi,

I just bought Samsung Galaxy Note 3 and want to setup it like my old Galaxy Nexus. Also I want to stay with fully stock ROM for a while so I need to perform everything without root.

I need encryption set on my phone. Problem was that for some reason Samsung ROM does not allow PIN unlock on encrypted device. Password wasn't convenient so I searched for workaround for this.

Solution was to install Tasker+Secure Settings and change lock type to PIN just once. Everything was perfect, PIN lock was set permanently. BUT, when I rebooted the phone I wasn't able to decrypt storage with old password. My device can be only decrypted with new PIN now.

How the hell that could be? I believed that when I set encryption password it will be used for decryption. Obviously for me now, it's not.

My question is: what encryption key is used for data decryption in Android? You can change password or PIN and decrypt device with it easily. In other words: what data (encryption key) should be hacked in order to decrypt the phone and where is it?