Code Monkey home page Code Monkey logo

pte's People

Contributors

brunoventura avatar gnxbr avatar pedroysb avatar thotypous avatar tncardoso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pte's Issues

About setting unicode locale on instructions

Currently, the setup instruction says this:

Please make sure you are using an Unicode locale, e.g.
export LC_ALL=en_US.UTF-8

Changing the default encoding could possibly break third party code, as described at Why sys.setdefaultencoding() will break code (at (1) Write once, change everything).

I suppose that's not a big issue in this project. Anyway, the consensus seems to be that we should explicitly convert input and output to/from unicode, always manipulating unicode inside our code, and always checking UnicodeEncodeError.

Just for reference, the env var PYTHONIOENCODING controls the encoding used by std{in,out,err}, so we don't need to use LC_ALL if we just want to set the stds' encoding.

So an alternative to the current setup, would be renaming ctf to something like ctf.py, and make ctf a bash script calling something like: PYTHONIOENCODING=UTF-8 ./ctf.py "$@".

If we want to change the enconding inside the code, we could do the following (reference: Encoding of Python stdout):

if sys.stdout.encoding != 'UTF-8':
    if PY2:
        sys.stdout = codecs.getwriter('utf-8')(sys.stdout, 'strict')
    else:
        sys.stdout = codecs.getwriter('utf-8')(sys.stdout.buffer, 'strict')

Apparently the writer returned does not have the endline buffering like the default stdout (not tested), but this should be irrelevant. Everything else works as expected.

I'm not sure if exporting LC_ALL makes the terminal more likely to display unicode, if supported. Gnome-terminal seems to not allow pasting unicode symbols if LC_ALL=C, although it still displays them when printed from python code.

If we want to support Windows, we may need even more setup, changing even the default font of cmd. I've got some reference links if you want.

NIZKCTF Protocol for ZKP

Hello,

Nice work with NIZKCTF. In my understanding, the scheme that uses digital signatures for proving the knowledge of sk_c and sk_t can be used in other cases too (except organizing CTFs). Since you are more familiar with the protocol, are there any use-cases that you can think of? Also, are there any examples on how to use the code?

Thanks in advance,
Dimitris Mouris

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.