This repository has been archived by the owner on Oct 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #389 from noir-lang/zpedro/scalar
renaming scalar multiplication
- Loading branch information
Showing
3 changed files
with
9 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 7 additions & 13 deletions
20
docs/standard_library/cryptographic_primitives/01_scalar.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,27 @@ | ||
--- | ||
title: Scalar multiplication | ||
description: | ||
See how you can perform scalar multiplications over a fixed base in Noir | ||
keywords: | ||
[ | ||
cryptographic primitives, | ||
Noir project, | ||
scalar multiplication, | ||
] | ||
description: See how you can perform scalar multiplications over a fixed base in Noir | ||
keywords: [cryptographic primitives, Noir project, scalar multiplication] | ||
--- | ||
|
||
import BlackBoxInfo from './common/\_blackbox.mdx'; | ||
import BlackBoxInfo from './common/_blackbox.mdx'; | ||
|
||
## scalar_mul::fixed_base | ||
## scalar_mul::fixed_base_embedded_curve | ||
|
||
Performs scalar multiplication over the embedded curve whose coordinates are defined by the | ||
configured noir field. For the BN254 scalar field, this is BabyJubJub or Grumpkin. | ||
|
||
```rust | ||
fn fixed_base(_input : Field) -> [Field; 2] | ||
fn fixed_base_embedded_curve(_input : Field) -> [Field; 2] | ||
``` | ||
|
||
example | ||
|
||
```rust | ||
fn main(x : Field) { | ||
let scal = std::scalar_mul::fixed_base(x); | ||
let scal = std::scalar_mul::fixed_base_embedded_curve(x); | ||
std::println(scal); | ||
} | ||
``` | ||
|
||
<BlackBoxInfo/> | ||
<BlackBoxInfo /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters