Trusted Platform Module V1.2 - tpm

I have a TPM v1.2(AT97SC3205T). I want to take ownership of this chip. I studied varies sections of taking ownership command. When I send this command I get a TPM_DECRYPT_ERROR error. So the problem is in the encOwnerAuth or encSrkAuth fields. Someone can help me see how these fields are made? I made the following steps to build them.
1- choice a key(for example "123456").
2- applying OAEP padding scheme to the key; // MGF1, SHA1, param = "TCPA".
3- encrypting pad_key using PubEk and RSA(with no padding).

Related

FC-SAN: How can I know there is new disk adding to the SAN?

If there is a SAN like this. enter image description here . when a new storage adds to the SAN, as a host how can I see it? whether it will be listed in the 'lsscsi' command ?
The most likely, you are struggling to send LIP - Loop initialization primitive. Read this post , for example, how to issue it.
Note, this procedure blocks IO, so be very careful doing it in production.

Xamarin Forms default permissions

I have built a Xamarin.Forms app and scanned the apk using MobSF. In the generated report I realized that the following permissions were added even though those were not included in the AndroidManifest.xml;
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.CAMERA
How can these permission be removed? I have already removed it from the AssemblyInfo.cs.
Also the iOS scan returns the following results;
Binary make use of banned API(s) : The binary may contain the following banned API(s) _printf, _fopen, _strncpy, _memcpy, _strcpy, _stat, _chmod, _sscanf, _strlen.
Binary make use of the insecure Random Function(s) : The binary may use the following insecure Random Function(s) _random.
Binary make use of malloc Function : The binary may use malloc function instead of calloc.
I cannot see a clear justification for these. How can these be justified as those are presented by the Xamarin.Forms framework?

SSH Keys for the Common User. cannot establish key chain. RaspBerry pi 2 model B

I try to establish passwords-less communication between mpi of my notes by using some video tutorial. However, at some point what I saw at the screen of the tutorial differ from from what I saw on my screen. As a result I fault to establish needed connection. I guess is that video tutorial missed some steps therefore I didn't get expected result. Let me guide you through the steps.
White screen will be screen of the tutor and black will be mine.
So I successfully establish connection between mpiu of notes I can enter exit ssh ls -la and do other things between my notes and mpiu of the notes. However, each time when I enter to the mpiu the system ask me the passwd so this step I wanna get rid of. For that matter:
I generate RSA key for the rpi0 ( my first note ) and ssh-copy it to the rpi1 ( my second note )
I checked that RSA key located on the both notes for mpiu#rpi1 it will be authorized_key file (as far as i'm understand )
for the mpiu#rpi0 it will be files id_rsa and id_rsa_pub
Now I need to make changes in rpi0 .bashrc file to establish key chain ( here problems begun )
3.1. So I went to home directory, I used vim in order to to edit file
3.2. Here I notice some difference in the file of tutor and mine - the tutor said that in the very end I should add some logic. However, in my file there are two fi , the tutor .bashrc file has only one fi at the end.
3.3. So I added logic after the second fi ( I saw that fi it states from finish => } - so probably it is true end )
3.4. that tutor enter command to apply the changes to the system
3.5. the tutor got this everything ok
but I got this
( take a look at the White-tutor---done-----black---mine-.pdf )
My first thought was I just need to download from the given website ( funtoo.org ) needed program and put it in the needed directory. However, the system deny my copy-past procedure by saying that I I have not rights.
So what should I do ? May be I should install the contain of the zip file to my note ( rpi0 ) by using some Linux command through the terminal ?
[RSA-Check-and-bashrc-files-.pdf][1]
[White-tutor---done-----black---mine-.pdf][2]
Everybody thx for attention. I solved the problem by installing needed programs through the terminal as I thought.

Sphinx4 figuring out correct models

I am trying to use the Sphinx4 library for speech recognition, but I cannot seem to figure out the correct combination of acoustic model-dictionary-language model. I have tried out various combinations and I get a different error every time.
I am trying to follow the tutorial on http://cmusphinx.sourceforge.net/wiki/tutorialsphinx4. I do not have a config.xml as I would if I was using ConfigurationManager instead of Configuration, because there is no perceivable way of passing the location of the config file to the Configuration itself (ConfigMgr takes it as an argument to the constructor); and that might be my problem right there. I just do not know how to point to one, and since the tutorial says "It is possible to configure low-level components of the application through XML file although you should do that ONLY IF you understand what is going on.", I assume having a config.xml file is not compulsory.
Combining the latest dictionary (7b - obtained from Sourceforge) with the latest acoustic model (cmusphinx-en-us-5.2.tar.gz - from SF again) and the language model (cmusphinx-5.0-en-us.lm.gz - from SF again) results in NullPointerException in startRecognition. The issue is similar to the problem here: sphinx-4 NullPointerException at startRecognition, but the link given in the answer no longer works. I obtained 0.7a from SF (since that is the dict the link seems to point at), but I am getting even earlier in the execution Error loading word: ;;; when I use that one. I tried downloading latest models and dict from the Github repo, that results in java.lang.IndexOutOfBoundsException: Index: 16128, Size: 16128.
Any help is much appreciated!
You need to use latest code from github
http://github.com/cmusphinx/sphinx4
as described by tutorial
http://cmusphinx.sourceforge.net/wiki/tutorialsphinx4
Correct models (en-us) are already included, you should not replace anything. You should not configure any XML files, use samples as provided in the sources.

Easiest way to decrypt PGP-encrypted files from VBA (MS Access)

I need to write code that picks up PGP-encrypted files from an FTP location and processes them. The files will be encrypted with my public key (not that I have one yet). Obviously, I need a PGP library that I can use from within Microsoft Access. Can you recommend one that is easy to use?
I'm looking for something that doesn't require a huge amount of PKI knowledge. Ideally, something that will easily generate the one-off private/public key pair, and then have a simple routine for decryption.
A command line solution is good. If your database is an internal application, not to be redistributed, I can recommend Gnu Privacy Guard. This command-line based tool will allow you to do anything that you need to with regard to the OpenPGP standard.
Within Access, you can use the Shell() command in a Macro like this:
Public Sub DecryptFile(ByVal FileName As String)
Dim strCommand As String
strCommand = "C:\Program Files\GNU\GnuPG\gpg.exe " _
& "--batch --passphrase ""My PassPhrase that I used""" & FileName
Shell strCommand, vbNormalFocus
End Sub
This will run the command-line tool to decrypt the file. This syntax uses a plaintext version of your secret passphrase. This is not the most secure solution, but is acceptable if your database is internal and only used by trusted personnel. GnuPG supports other techniques to secure the passphrase.
PGP has a commandline option for decrypting files.
We have a batchfile that does the decryption, passing in the filename to be decrypted:
Batch file:
"C:\Program Files\Network Associates\PGPNT\pgp" +FORCE %1 -z *password*
We than call that from a VBS:
Command = "decrypt.bat """ & FolderName & FileName & """"
'Executes the command script.
Set objShell = WScript.CreateObject ("WSCript.shell")
Command = "cmd /c " & Command
objShell.run Command, 1, True
Hope that points you in a useful direction.
You can use OpenPGPBlackbox (ActiveX edition) for this
Stu... I once had to write a "Secure SMTP" server in Java... The easiest, and quickest way to do this is to download and/or purchase PGP. They have an SDK that you can use to access in anything you want.
I'd have to go back and see if I had to write a COM wrapper, or if they already had one. (I wrote this SMTP server about 10 years ago). Anyways, don't get discouraged. About 5 years ago, I wrote an entire PGP based application (based on the openPGP RFC) in C++, but the catch was, I was NOT allowed to use any existing libraries. So I had to write all that stuff myself. And, I used GPG, OpenPGP, and PGP for testing, etc....
So, I could even provide help for you on how to decode this stuff in VBA. It's not impossible, (it may be slow as hell, but not impossible), and I'm NOT one to "shell out and run cmdline stuff to do work like this for you, as it will open you up to some SERIOUS security risks, as hurcane's suggestion (for example) will cause your passphrase to be displayed to tools like ProcExp). The first step is learning how PKE works, etc. Then, the steps you need to do to get what you want.
This is something I'd be interested in helping with since I'm always one to write code that everyone says can't be done. :) Plus, I own the source code of the app I wrote, because of of mergers, closures, etc...
It was originally written for the Oil and Gas industry, so I know it's secure. That's not to say I don't have ANY security flaws in the code, but I think it's stable. I know I have an issue with my Chinese Remainder Threory code.. For some reason when I use that short-cut, I can't decode the data correctly, but if I use the RSA "long way" it works...
Now, this application was never fully finished, so I don't support things like DSA Key-pairs, but I do support RSA key pairs, with SHA1, MD5, using IDEA, AES, (I THINK my 3DES code does not work correctly, but I may have fixed that since). I didn't implement compression yet, etc... But, I'd love a reason to go back and work on this code again.
I /COULD/ make you a COM object that you could call from VBA passing the original Base64 data in, along with the Base64 key data, (or a pointer to a key file on disk), and a passpsshrase to decode files....
Think about it... Let me know..
Over the years, I have collected vbScript code for doing things like MD5, SHA1, IDEA, and other crypto routines, but I didn't write them. Hell, you could probably just interface with Microsoft's CryptoAPI, and break each action down to it's core parts and still get it to work. (You will not find a Micosoft CryptoAPI call like "DecryptPGP()"... It'd all have to be done in chunks).
Lemme know if I can help.
I would look for a command line encrypter / decrypter and just call the exe from within your Access application, with the right parameters.
There is no PGP encrypter / decrypter in VBA that I know of.
I am not familiar with VBA for Access, but i think that the best solution (perhaps easiest) would be run external command-line PGP utility.
There is a DLL you can call directly from your VBA application without having to span an external program: CryptoCX. PGP has also a DLL you can call.

Resources