BIP-38 is a Bitcoin Improvement Proposal that describes how to protect a single Bitcoin private key with a passphrase. The key is encrypted using the scrypt key-stretching function and AES, and the result is written as a text string beginning with "6P". Anyone who finds the encrypted key still needs the passphrase to spend the coins, and scrypt makes guessing passphrases slow and costly.
The scheme was mainly used for paper wallets, where a printed key could otherwise be photographed or copied, and some tools let a third party generate encrypted keys without ever learning the unencrypted version. BIP-38 is a wallet convention, not a change to Bitcoin's consensus rules, and it remained a draft standard. It has largely given way to HD wallets backed up with BIP-39 seed phrases, which protect many keys at once.
Ref 1070001102