Text this: Primitive-Level vs. Implementation-Level DPA Security: a Certified Case Study