OpenSSL Cryptography - linux

How can I expand OpenSSL in Linux so that it can implement Pairing-based Cryptography? I am doing my thesis and this is the final part of it. I am guessing I need to find pairing based cryptographic libraries that can work within OpenSSL? Please help

Related

Python3 DTLS Server/Client

I am planning to implement a "simple" DTLS tool in python3, which is able to initiate (client) and accept DTLS (server) connections with a PSK as a PoC (later on i am planning to extend it to certificate-based authentication).
I spent days researching libraries that offer this functionality, but i am still not sure what to use. (Any wrapper/library suggestion with documentation/examples are more than welcome).
While it is straightforward to create the DTLS Clients/Servers with the openssl binaries (for example):
openssl s_server -dtls -accept 1337 -nocert -psk deadbeef -cipher PSK-AES128-CCM8
for the server (with a specific ciphersuite) and
openssl s_client -dtls -connect 127.0.0.1:1337 -psk deadbeef -cipher PSK-AES128-CCM8
for the client, i am struggling to find do this with python. (pyopenssl offers no DTLS support) Are there any concrete examples for an implementation using a widly supported library/wrapper? (There are some Coap/IoT libraries out there focussing on the client side (aiocoap), but for my idea it is neccessary to implement both sides)
I ended up using mbedTLS (former PolarSSL). They offer a quite extensive Python3 wrapper that offering almost all of mbedTLS functionality. The readme offers a very useful DTLS sample implementation featuring authentication using a psk and/or certs.

Regarding AES128bit-CBC

I'm trying to develop a kind of security program on Linux. So, My plan is currently to use AES128bit-CBC. I heard AES 128 is basically supported on OSX. Is there any libraries on Linux like that?
The libcrypto library in the OpenSSL package supports AES128 encryption. Most Linux distributions like RHEL, SuSE and ubuntu come with OpenSSL.
The AES_set_encrypt_key() and AES_cbc_encrypt() functions from <openssl/aes.h> implement the function you're after.

Securing UDP - OpenSSL or GnuTls or ...?

I need to secure my UDP traffic. As far as I understand DTLS protocol is the best way to do it. There is another one - IPsec - but it looks not applicable for me because it's not easy to use and there are possible hardware problems.
I've found that there are some libraries which have DTLS implemented. So now I'm trying to choose - OpenSSL or GnuTls? Could you please advise me what is better to use? What are drawbacks or advantages? Or may be there is another library with DTLS support implemented?
I've found the following facts about the libraries and DTLS.
There is another lib with DTLS support - CyaSSL, but it supports DTLS only in test mode for now.
Although RFC 4347 dates from Apr, 2006, the OpenSSL supports DTLS since 2005 (v0.9.8). Many Linux distribs include this version. OpenSSL API looks ugly a little, but it seems like DTLS implementation is stable.
GnuTls supports DTLS since 2011 (v3.0.0). Looks like no Linux includes this version yet. (For example, Ubuntu 11.04 uses v2.8.6, Ubuntu 11.10 is going to use v2.10.5, not v3.0.0.) There is no information about when v3.0 will be used. It can be built manually, however it depends on too many additional libraries which may have no native support in some distribs.
It looks like all of these libraries can be used on other platforms (e.g. Windows).
Known OpenSSL issue: OpenSSL has compression enabled by default for DTLS, but it shouldn't be. OpenSSL v0.9.8 API doesn't provide any method to disable compression. The method should be implemented manually.
SUMMARY:
Speaking about usability, personally I would prefer GnuTls API, but at the time OpenSSL looks more preferable to use.
IPsec is the oldest and hence most compatible and stable, but requires tasks from the sysadmin and can be quite challenging for novices. DTLS is tackling the problem from the application side which the programmer can significantly simplify and integrate with existing environments with less change.
The choice between OpenSSL and GnuTLS is almost always due to license.
OpenSSL license includes an advertising clause:
3. All advertising materials mentioning features or use of this *
software must display the following acknowledgment: * "This
product includes software developed by the OpenSSL Project * for
use in the OpenSSL Toolkit. (http://www.openssl.org/)"
GnuTLS from Wikipedia:
GnuTLS was initially created to allow applications of the GNU project
to use secure protocols such as TLS. Although OpenSSL already existed,
OpenSSL's license is not compatible with the GPL;[4] thus software
under the GPL, such as GNU software, could not use OpenSSL without
making a GPL linking exception.
http://en.wikipedia.org/wiki/GnuTLS

On iOS, what's the benefit of OpenSSL over using CFStream, CFNetwork etc. for secure sockets?

One obvious benefit seems to be the low level access you gain from using OpenSSL. But, I'd like to know if there's anything (important) that you can do with OpenSSL and not otherwise.
Secure Transport (the SSL/TLS implementation available on Mac OS X) is not available on iOS as of version 4.2.1. Third-party developers have to use the URL Loading System or CFNetwork (the latter optionally together with NSStream).
I checked this again and the only benefit of OpenSSL seems to be it's range of cipher suites supported. Also, OpenSSL gives you a much granular control of the entire process, but this may be superfluous for most applications.

PGP - GnuPG - A few questions

I want to use GnuPG (http://www.gnupg.org/), the open source software that is a full replacement for PGP.
The software looks great though I have never used it before.
I will be using the software to encrypt files to transfer via the web, I am not using the software for emails.
I have a few questions:
What are recommended GUI's available for windows and Ubuntu?
I want to generate a generate a key pair that is Diffee Hellman (DH/DSS) not RSA. What is the line command to do this? As well using the key length of 2048.
Once I generate my public-private key pair, how do I sign someone elses public key that I have through command line?
All of these are found in the manual.
http://www.gnupg.org/related_software/frontends.html
http://www.dewinter.com/gnupg_howto/english/GPGMiniHowto-3.html
http://www.dewinter.com/gnupg_howto/english/GPGMiniHowto-3.html#ss3.6

Resources