Questions in Bitwarden White Paper

Hi,

I have a school project where I have to design a password manager app so I’m reading Bitwarden white paper to have an idea of what’s going on and I have a few question.

First, Bitwarden use AES-256 bits encryption which means the iv length must be 128 bits and the key length must be 256 bits. However, the Symmetric Key is encrypted using stretched master key and it’s length is 512 bits, and the Organization Symmetric Key is encrypted using the public key generated from RSA Key Pair and it’s wayy longer than 256 bits. How is this possible?

Second, I’m writing this using javascript. Would it look something like this for deriving the protected symmetric key?

const masterKey = pbkdf2Sync(password, email, 100000, 32, ‘sha256’);
const symmetricKey = randomBytes(64);
const iv = randomBytes(16);
const cipher = createCipheriv(‘aes-256-cbc’, masterKey, iv);
const protectedSymmetricKey =cipher.update(symmetricKey, ‘utf8’, ‘hex’) + cipher.final(‘hex’);

Hi,

I have a school project where I have to design a password manager app so I’m reading Bitwarden white paper to have an idea of what’s going on and I have a few question.

First, Bitwarden use AES-256 bits encryption which means the iv length must be 128 bits and the key length must be 256 bits. However, the Symmetric Key is encrypted using stretched master key and it’s length is 512 bits, and the Organization Symmetric Key is encrypted using the public key generated from RSA Key Pair and it’s wayy longer than 256 bits. How is this possible?

Second, I’m writing this using javascript. Would it look something like this for deriving the protected symmetric key?

const masterKey = pbkdf2Sync(password, email, 100000, 32, ‘sha256’);
const symmetricKey = randomBytes(64);
const iv = randomBytes(16);
const cipher = createCipheriv(‘aes-256-cbc’, masterKey, iv);
const protectedSymmetricKey =cipher.update(symmetricKey, ‘utf8’, ‘hex’) + cipher.final(‘hex’);

Honestly, you’re probably better off heading to GitHub for this. It is open-source after all. Lots of people here who are going to have no idea what you just asked lol.

Hi,

I have a school project where I have to design a password manager app so I’m reading Bitwarden white paper to have an idea of what’s going on and I have a few question.

First, Bitwarden use AES-256 bits encryption which means the iv length must be 128 bits and the key length must be 256 bits. However, the Symmetric Key is encrypted using stretched master key and it’s length is 512 bits, and the Organization Symmetric Key is encrypted using the public key generated from RSA Key Pair and it’s wayy longer than 256 bits. How is this possible?

Second, I’m writing this using javascript. Would it look something like this for deriving the protected symmetric key?

const masterKey = pbkdf2Sync(password, email, 100000, 32, ‘sha256’);
const symmetricKey = randomBytes(64);
const iv = randomBytes(16);
const cipher = createCipheriv(‘aes-256-cbc’, masterKey, iv);
const protectedSymmetricKey =cipher.update(symmetricKey, ‘utf8’, ‘hex’) + cipher.final(‘hex’);

Hey man, have you done what I said you should or thought about it yourself?

Crunch time is coming huh? :grin: