diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-23 19:11:26 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-23 19:11:26 +0800 |
commit | 9b470ec24637117d133d4f2c1138adaaaaea8e9f (patch) | |
tree | 4253a8fb6959382d85f52174abe27a75722c8a34 | |
parent | tmpl.go: The identifier is I, not N (diff) | |
download | powxy-9b470ec24637117d133d4f2c1138adaaaaea8e9f.tar.gz powxy-9b470ec24637117d133d4f2c1138adaaaaea8e9f.tar.zst powxy-9b470ec24637117d133d4f2c1138adaaaaea8e9f.zip |
tmpl.go: Message should go after the submit buttonv0.1.3
-rw-r--r-- | tmpl.go | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -187,12 +187,6 @@ func init() { <p>You must complete this proof-of-work challenge before you can access this site.</p> </section> - {{- if .Message }} - <section> - <p><strong>{{ .Message }}</strong></p> - </section> - {{- end }} - <section> <p>Select a nonce no longer than 32 bytes, such that when it is appended to the decoded form of the challenge identifier, and the entire result is hashed with SHA-256, the first {{ .Global.NeedBits }} bits of the SHA-256 hash are all zeros. Within one octet, higher bits are considered to come before lower bits.</p> <p>In other words, find an nonce <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mi>N</mi><annotation encoding="application/x-tex">N</annotation></semantics></math> with <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false" form="prefix">|</mo><mi>N</mi><mo stretchy="false" form="postfix">|</mo><mo>≤</mo><mn>32</mn><mspace width="0.167em"></mspace><mi mathvariant="normal">B</mi></mrow><annotation encoding="application/x-tex">\lvert N\rvert \le 32\,\mathrm{B}</annotation></semantics></math>, such that <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mrow><mi mathvariant="normal">S</mi><mi mathvariant="normal">H</mi><mi mathvariant="normal">A</mi><mn mathvariant="normal">256</mn></mrow><mrow><mo stretchy="true" form="prefix">(</mo><mi>I</mi><mspace width="0.167em"></mspace><mo stretchy="false" form="postfix">∥</mo><mspace width="0.167em"></mspace><mi>N</mi><mo stretchy="true" form="postfix">)</mo></mrow><mo><</mo><msup><mn>2</mn><mn>{{ .Global.NeedBitsReverse }}</mn></msup></mrow><annotation encoding="application/x-tex">\mathrm{SHA256}(I \,\|\, N) < 2^{{{ .Global.NeedBitsReverse }}}</annotation></semantics></math> in big endian, where <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mi>I</mi><annotation encoding="application/x-tex">I</annotation></semantics></math> is the identifier provided below.</p> @@ -210,6 +204,12 @@ func init() { </form> </section> + {{- if .Message }} + <section> + <p><strong>{{ .Message }}</strong></p> + </section> + {{- end }} + <section> <p id="solver_status">JavaScript seems to be disabled. You must solve the challenge externally.</p> </section> |