Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][ADD] sign_biometric_oca: Proof of Concept #14

Open
wants to merge 3 commits into
base: 16.0
Choose a base branch
from

Conversation

etobella
Copy link
Member

@etobella etobella commented Dec 1, 2023

Theoretically, this module allows us to store position, pressure and time of the signature, making it biometric.

I still need to compare with https://www.iso.org/standard/77910.html in order to check if something is missing.

Theoretically, we need:

  • Position
  • Pressure
  • Speed
  • Acceleration

Speed and Acceleration might be computed using position and time, so I assume everything is correcly computed 😄

@gdgellatly
Copy link

If I recall correctly speed is the first order rate of change of distance, distance is the first order rate of change of position, and acceleration is the first order rate of change of speed, all over time, so should all be able to be computed but it will probably need multiple positions and speeds measured. But I imagine some 3rd party lib does this already.

@etobella
Copy link
Member Author

etobella commented Dec 1, 2023

Exactly, we could compute it on the fly if we want to 😄

@lubusax
Copy link

lubusax commented Dec 1, 2023

How could pressure be measured?

Android has a built-in function to measure pressure:
https://developer.android.com/reference/android/view/MotionEvent.html#getPressure(int)

getPressure() is a method in the MotionEvent class in Android that returns the pressure of the touch event. The pressure value is a float that ranges from 0.0 to 1.0, where 1.0 represents the maximum pressure that the device can detect.

@etobella
Copy link
Member Author

etobella commented Dec 2, 2023

How could pressure be measured?

Android has a built-in function to measure pressure: https://developer.android.com/reference/android/view/MotionEvent.html#getPressure(int)

getPressure() is a method in the MotionEvent class in Android that returns the pressure of the touch event. The pressure value is a float that ranges from 0.0 to 1.0, where 1.0 represents the maximum pressure that the device can detect.

I think pressure is not required, but recommended. I need to check on a mobile how it was stored, but the JS worked perfectly 😄

@etobella
Copy link
Member Author

Just be aware that this module should not be used on production right now, as you will be collecting biometric data and storing it in a raw format inside Odoo!!!

I am still working on it, but I hope I can send a final version soon 😄

@etobella
Copy link
Member Author

Biometric data should be secure with this new change. Still reviewing it, but that should be enough 😄

@etobella etobella marked this pull request as ready for review December 21, 2023 11:05
@etobella
Copy link
Member Author

In order to make it work, you might need a certificate.

To generate it, just use the following code:

openssl ecparam -name secp256k1 -genkey -noout -out ec-secp256k1-priv-key.pem
openssl ec -in ec-secp256k1-priv-key.pem -pubout > ec-secp256k1-pub-key.pem

If you want the value to paste into odoo, you can use:

openssl ec -in ec-secp256k1-priv-key.pem -pubout -outform DER  | base64 -w 0

Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale label Apr 21, 2024
@pedrobaeza pedrobaeza added this to the 16.0 milestone Apr 22, 2024
@pedrobaeza
Copy link
Member

There are conflicts.

Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this adding also things about PDF?

@etobella
Copy link
Member Author

Because it creates a completly different widget for images. The system needs to know how this data is displayed inside a PDF. The original widget is not right, because signing writing your name with your keyboard is, obviously, not a biometric.

@pedrobaeza pedrobaeza removed the stale label Apr 24, 2024
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale label Aug 25, 2024
Copy link
Member

@marcelsavegnago marcelsavegnago left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@etobella etobella force-pushed the 16.0-perfect branch 2 times, most recently from 20bfec2 to d7cbc9c Compare August 25, 2024 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants