This file contains hidden or 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
// | |
// FSCopyableImage.h | |
// | |
// Created by Alexander Vlasov on 11.11.16. | |
// Copyright © 2016 Alexander Vlasov. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> | |
@protocol FSCopyableImageViewDelegate; | |
@interface FSCopyableImageView : UIImageView |
This file contains hidden or 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
from keras.layers import Recurrent | |
import keras.backend as K | |
from keras import activations | |
from keras import initializers | |
from keras import regularizers | |
from keras import constraints | |
from keras.engine import Layer | |
from keras.engine import InputSpec | |
This file contains hidden or 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
0xe6877a4d8806e9a9f12eb2e8561ea6c1db19978d |
This file contains hidden or 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
Verifying my identity on Peepeth.com 0x6394b37cf80a7358b38068f0ca4760ad49983a1b |
This file contains hidden or 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
#check BN-curve from etherium | |
BN_p = 21888242871839275222246405745257275088696311157297823662689037894645226208583 | |
BN_curve = EllipticCurve(GF(BN_p),[0,3]) | |
BN_order = BN_curve.order() | |
# print BN_order in Primes() | |
# print BN_order % 4 | |
#we are going to use algorithm described in | |
#https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/NIST.pdf | |
#see also: http://iml.univ-mrs.fr/ati/crypto_puces/2009/slides/ivey-law.pdf |
This file contains hidden or 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
0 20933170699147567579033322641963108696395791188513690084963135910641532928274 2442431204756310761602153127686318554574960794578976757443433976540189788252 0 4887099059762129640302984526748584436465700498472647690070911027557383648471 1537761002038265777208458665898474687934111788158087930192782735780488615370 | |
0 16573055444656122843537507139515729097968881044881963088535952613432732109576 15823969213404520820670755358760897637430302424438918422654019939237973220852 19043350362690960802787632939519229156536345342250133376920132587983219143570 5672529627952885536591336430691382520056316077527491874420269967257820619040 0 14461792803667918890803887317933444090830840712748147371492463942958574209725 13071829618513332891552585680079909704651276111106970019151699080596107269576 | |
0 4553363573730177428827227824438616079346298937519779886664801330607001971471 21456699004685635406151940504311915468194491877421700836100090035559356021754 0 5750931461328290137207375961192256416814227690413125433502291640571740409967 8930 |
This file contains hidden or 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
namespace libsnark { | |
template<typename FieldT, typename HashT> | |
tx<FieldT,HashT>::tx(protoboard<FieldT> &pb, | |
pb_variable_array<FieldT> &pub_key_x_bin, // sender's pubkey X | |
pb_variable_array<FieldT> &pub_key_y_bin, // sender's pubkey Y | |
pb_variable_array<FieldT> &balance_bin, // sender's leaf's balance | |
pb_variable_array<FieldT> &balance_recipient_bin, // recipients's leaf's balance | |
pb_variable_array<FieldT> &balance_new_bin, // sender's leaf's balance | |
pb_variable_array<FieldT> &balance_recipient_new_bin, // recipients's leaf's balance | |
pb_variable_array<FieldT> &tx_amount_bin, // tx amount |
This file contains hidden or 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
2^25 powers | |
Alex Vlasov: | |
- make empty accumulator | |
Blank hash for an empty challenge: | |
786a02f7 42015903 c6c6fd85 2552d272 | |
912f4740 e1584761 8a86e217 f71f5419 | |
d25e1031 afee5853 13896444 934eb04b | |
903a685b 1448b755 d56f701a fe9be2ce |
This file contains hidden or 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
Trim first byte if you use "operations" API | |
MNT4 753 bits 4 pairs. | |
035f01c4c62d92c41110229022eee2cdadb7f997505b8fafed5eb7e8f96c97d87307fdb925e8a0ed8d99d124d9a15af79db117e776f218059db80f0da5cb537e38685acce9767254a4638810719ac425f0e39d54522cdd119f5e9063de245e8001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000201373684a8c9dcae7a016ac5d7748d3313cd8e39051c596560835df0c9e50a5b59b882a92c78dc537e51a16703ec9855c77fc3d8bb21c8d68bb8cfb9db4b8c8fba773111c36c8b1b4e8f1ece940ef9eaad265458e06372009c9a0491678ef4600001c4c62d92c41110229022eee2cdadb7f997505b8fafed5eb7e8f96c97d87307fdb925e8a0ed8d99d124d9a15af79db26c5c28c859a99b3eebca9429212636b9dff97634993aa4d6c381bc3f0057974ea099170fa13a4fd90776e2400000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
This file contains hidden or 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
Multiply G1 generator by zero: | |
Input: 0x17f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb08b3f481e3aaa0f1a09e30ed741d8ae4fcf5e095d5d00af600db18cb2c04b3edd03cc744a2888ae40caa232946c5e7e10000000000000000000000000000000000000000000000000000000000000000 | |
Output: 0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 | |
OlderNewer