One or more non-transitory computer-readable storage mediums having stored thereon executable computer program instructions that, when executed by one or more processors, cause the one or more processors to perform operations comprising: performing a secure operation in a computing system, the secure operation being one of attesting to a platform for the computing system or performing a secure key exchange for the computing system, the secure operation including: performing an elliptic curve scalar multiplication, ESM, operation based on data for the secure operation, the operation including application of a secret scalar value including a plurality of bits; counting a number of leading '0' bits in the plurality of bits of the secret scalar value; skipping the number of leading '0' bits in the secret scalar value in processing of the secret scalar value; performing an ESM iteration for each bit of the secret scalar value beginning with a most significant '1' bit of the secret scalar value after the leading '0' bits, wherein the performance of the ESM iteration includes a Point Addition operation and a Point Double operation for each bit of the secret scalar value after the leading '0' bits; following performance of the ESM iterations for the secret scalar value, performing ESM iterations for each of a number of dummy operations, the number of dummy ESM iterations being equal to the number of leading '0' bits in the secret scalar value, wherein a total number of ESM iterations for the secret scalar value and the dummy operations equals a total number of the plurality of bits of the secret scalar value; returning an output result for the ESM operation; and applying the output result in the secure operation to attest to the platform for the computing system or to perform the secure key exchange for the computing system. performing an elliptic curve scalar multiplication, ESM, operation based on data for the secure operation, the operation including application of a secret scalar value including a plurality of bits; counting a number of leading '0' bits in the plurality of bits of the secret scalar value; skipping the number of leading '0' bits in the secret scalar value in processing of the secret scalar value; performing an ESM iteration for each bit of the secret scalar value beginning with a most significant '1' bit of the secret scalar value after the leading '0' bits, wherein the performance of the ESM iteration includes a Point Addition operation and a Point Double operation for each bit of the secret scalar value after the leading '0' bits; following performance of the ESM iterations for the secret scalar value, performing ESM iterations for each of a number of dummy operations, the number of dummy ESM iterations being equal to the number of leading '0' bits in the secret scalar value, wherein a total number of ESM iterations for the secret scalar value and the dummy operations equals a total number of the plurality of bits of the secret scalar value; returning an output result for the ESM operation; and applying the output result in the secure operation to attest to the platform for the computing system or to perform the secure key exchange for the computing system.