Giter VIP home page Giter VIP logo

Comments (12)

robinkrahl avatar robinkrahl commented on May 29, 2024 1

@jans23 That would be great! I can’t make promises regarding the timeline, but I’m definitely interested in porting all libnitrokey features to Rust and, eventually and if applicable, to a command-line application.

from nitrocli.

jans23 avatar jans23 commented on May 29, 2024 1

@d-e-s-o Please write us an email in case you need more hardware.

from nitrocli.

d-e-s-o avatar d-e-s-o commented on May 29, 2024

Hi Robin. In general the answer is yes, I am open to and interested in combining efforts. My main worry is that we cannot have both: raw hidapi style communication as well as integration with libnitrokey. It appears nitrokey would not quite be capable of backing the existing functionality as it stands. Do you plan on adding support to the point that nitrocli could fully migrate over?

from nitrocli.

robinkrahl avatar robinkrahl commented on May 29, 2024

Good to hear! I’m happy to extend the nitrokey crate, but as I do not have a Nitrokey Storage, I cannot test anything related to it. Would you be willing to run the tests?

As far as I see, you are using these commands in nitrocli:

  • EnableEncryptedVolume (0x20)
  • DisableEncryptedVolume (0x21)
  • GetDeviceStatus (0x2E)

The first two correspond directly to NK_unlock_encrypted_volume and NK_lock_encrypted_volume in libnitrokey. I can easily add these to the nitrokey crate. GetDeviceStatus is more problematic. While the C++ API provides access to the complete status, the C API only provides access to a string version (NK_get_status_storage_as_string). We can get the firmware version and the retry counts from other sources (already available in the nitrokey crate), but not the volume and SD card information.

So I am going to add support for enabling and disabling encrypted volumes to the nitrokey-rs, and I’ll prepare a patch for libnitrokey to add the full device status to the C API.

from nitrocli.

jans23 avatar jans23 commented on May 29, 2024

@robinkrahl In case you are interested in adding full support for Nitrokey Storage, we would be glad to donate you a device.

from nitrocli.

d-e-s-o avatar d-e-s-o commented on May 29, 2024

Would you be willing to run the tests?

Sure. I am in a similar boat. I don't have a Nitrokey Pro and my storage device contains actual data, so I have to be careful. But we'll figure something out.

from nitrocli.

d-e-s-o avatar d-e-s-o commented on May 29, 2024

@jans23 Sure, thanks for the offer! Right now I am good as I have no new developments in the pipeline. So if Robin is fully covered for his testing that may be enough. I'll see how straightforward the code looks and whether I can get enough coverage with my existing hardware :-)

from nitrocli.

robinkrahl avatar robinkrahl commented on May 29, 2024

I finally finished the work I started this summer and ported the existing nitrocli commands to libnitrokey. The code is available in the wip/libnitrokey branch of my fork. Now I’ll continue to add more commands.

@d-e-s-o

  1. How would you like to receive code contributions – Github pull requests, link to code via mail, patches via mail, something else?
  2. We should discuss how to structure the new code. Should I open issues for these discussions, or do you want to discuss via mail?

from nitrocli.

d-e-s-o avatar d-e-s-o commented on May 29, 2024

I finally finished the work I started this summer and ported the existing nitrocli commands to libnitrokey. The code is available in the wip/libnitrokey branch of my fork. Now I’ll continue to add more commands.

That is great news @robinkrahl ! Thanks for working on this. I'll have a look hopefully later today to get a better impression of where you are, by Wednesday at the latest.

  1. How would you like to receive code contributions – Github pull requests, link to code via mail, patches via mail, something else?

We can keep everything on Github. Pull request on the platform should be fine.

  1. We should discuss how to structure the new code. Should I open issues for these discussions, or do you want to discuss via mail?

Same here. Opening issues should be fine!

from nitrocli.

d-e-s-o avatar d-e-s-o commented on May 29, 2024

OTP support got merged! Thanks for implementing this feature @robinkrahl . I believe that justifies a new release. I will probably bump to 0.2 to pay tribute to the significant changes that went into this version: the change to using the nitrokey crate, the switch to using argparse, and the implementation of OTPs. I'll wait for my new device, though, in order to run a final round of tests.

from nitrocli.

robinkrahl avatar robinkrahl commented on May 29, 2024

from nitrocli.

d-e-s-o avatar d-e-s-o commented on May 29, 2024

Could you wait some days before releasing the next version?

Sure. I don't want to cram too much into a release and rather release once more, but I also don't want to block progress.

from nitrocli.

Related Issues (20)

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.