handrolled cbc encryption