Skip to content

Run the crypto test vectors code with ODE team's OSS encoder

Matt S edited this page Feb 2, 2018 · 7 revisions

Overview

This will outline the steps to create a CSR using the crypto-test-vectors repository with the modifications to use the ODE team's OSS encoder. For all intents and purposes, the only changes were Maven dependencies in the pom.xml, import statements in relevant classes, and commenting out code with not-included dependencies. For a full list of changes, see the git_diff.txt file in the top directory.

Process

1. Unzip the code


2. Set environment variables

HOMEDRIVE should be set to the path to the java-asn1-manager subdirectory in the repository

export HOMEDRIVE=/path/to/your/crypto-test-vectors/java-asn1-manager

HOMEPATH needs to exist, but can be set to blank

export HOMEPATH=""

PYTHONPATH needs to be set to the top level of the repository

export PYTHONPATH=/path/to/your/crypto-test-vectors

Note

The application outputs the results to:

/crypto-test-vectors/java-asn1-manager/Google Drive/eTrans Top Level/Clients/CAMP/MAI Project/MAI Tests/Enrolled Vehicles/<vehicleId>/

The application may throw an error if this folder doesn't exist. If so, create it.


3. Create or edit the control file

I have created my own control file msenrollment.json which is located in /crypto-test-vectors/camp-submission-tool/controlFiles/. You may use this or create your own. Note that the <vehicleId> will be the name of the folder created under the Enrolled Vehicles folder mentioned in the previous step.


4. Compile the code in java-asn1-manager

cd java-asn1-manager

mvn clean install


5. Run the code with desired arguments

For enrollment CSRs you will use these arguments:

--messageType=enrollment

--controlFile=../camp-submission-tool/controlFiles/msenrollment.json

So in total:

java -jar target/mbr-builder-1.3-SNAPSHOT.jar --messageType=enrollment --controlFile=../camp-submission-tool/controlFiles/msenrollment.json

Note

If you have already run the code and a folder with an identical vehicleId already exists, the code will throw an error. Simply delete that folder between runs.


6. View outputs

In the logs you will see these statements, the hex CSR being the third:

2018-02-02 14:41:07.588  INFO 16293 --- [           main] o.c.m.enrollment.EnrollmentProcessor     : privateKey=10BD...7B9F
2018-02-02 14:41:07.588  INFO 16293 --- [           main] o.c.m.enrollment.EnrollmentProcessor     : publicKey=75c5...ae79
2018-02-02 14:41:08.032  INFO 16293 --- [           main] o.c.m.enrollment.EnrollmentProcessor     : Encocded data: 0383...e3408

The encoded CSR will be saved to:

/crypto-test-vectors/java-asn1-manager/Google Drive/eTrans Top Level/Clients/CAMP/MAI Project/MAI Tests/Enrolled Vehicles/<vehicleId>/enrollment_request.oer

Releases

Change Notices

Informational Reference

  • Decode a file with asn1c
  • Deposit BSM to S3
  • Docker fix for SSL issues due to corporate network
  • Docker management
  • ECDSA Primer
  • Filter BSMs through PPM module
  • Geofence Filtering for PPM
  • Import BSMs from RSU log file
  • Import TIMs from RSU log file
  • jpo security svcs Integration
  • Link host directory to Docker directory
  • Migrating from SDW websocket depositor to SDW Depositor Submodule
  • ODE Release Deployment
  • ODE Release Preparation
  • Prepare a fresh Ubuntu instance for ODE installation
  • Process for Handling Bugs (Code Defects)
  • Run the ODE using the ASN codec module
  • Query RSU for set TIMs
  • Schema Version 6 Change Notice
  • Signed Message File Import
  • TIM REST Endpoint Changes
  • Using the .env configuration file
  • Using the ODE test harness

Test Procedures

  • Delete TIM on RSU test
  • Event Logger Test
  • Import Decode and Deliver BSM Test
  • Manage SNMP Test
  • Sending PDM to RSU Test
  • Sending TIM to RSU Test
  • Submit_TIM_To_SDW Test

Archived

  • Log File Changes (schemaVersion=4)
  • Receive BSMs over UDP
  • Receive ISD via UDP and deposit to SDC
  • Receive VSD via UDP and deposit to SDC
  • Run the crypto test vectors code with ODE team's OSS encoder
  • SchemaVersion 5 Change Notice
Clone this wiki locally