def scalarmult_B(e):
<EOL>e = e % l<EOL>P = ident<EOL>for i in range(<NUM_LIT>):<EOL><INDENT>if e & <NUM_LIT:1>:<EOL><INDENT>P = edwards_add(P, Bpow[i])<EOL><DEDENT>e = e // <NUM_LIT:2><EOL><DEDENT>assert e == <NUM_LIT:0>, e<EOL>return P<EOL>
Implements scalarmult(B, e) more efficiently.