Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 49923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:30:46+00:00 2026-05-10T16:30:46+00:00

I haven’t a clue about encryption at all. But I need it. How? Say

  • 0

I haven’t a clue about encryption at all. But I need it. How?

Say you have a system of nodes communicating with each other on a network via asynchronous messages. The nodes do not maintain session information about other nodes (this is a design restriction).

Say you want to make sure only your nodes can read the messages being sent. I believe encryption is the sollution to that.

Since the nodes are not maintaining a session and communication must work in a stateless, connectionless fashion, I am guessing that asymmetric encryption is ruled out.

So here is what I would like to do:

  • messages are sent as UDP datagrams
  • each message contains a timestamp to make messages differ (counter replay attacks)
  • each message is encrypted with a shared secret symmetric key and sent over the network
  • other end can decrypt with shared secret symmetric key

Keys can obviously be compromised by compromising any single node. At the same time, in this scenario, access to any single compromised node reveals all interesting information anyway, so the key is not the weakest link.

What cypher should I use for this encryption? What key length?

I would prefer to use something supported by ezPyCrypto.

Assuming, as most point out, I go with AES. What modes should I be using?

I couldn’t figure out how to do it with ezPyCrypto, PyCrypto seems to be hung on a moderator swap and googles keyczar does not explain how to set this up – I fear if I don’t just get it, then I run a risk of introducing insecurity. So barebones would be better. This guy claims to have a nice module for AES in python, but he also asserts that this is his first python project – Allthough he is probably loads smarter than I, maybe he got tripped up?

EDIT: I moved the search for the python implementation to another question to stop clobber…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T16:30:46+00:00Added an answer on May 10, 2026 at 4:30 pm

    Your first thought should be channel security – either SSL/TLS, or IPSec.
    Admittedly, these both have a certain amount of setup overhead, IPSec more than SSL/TLS, especially when it comes to PKI etc. – but it more than pays for itself in simplicity of development, reliability, security, and more. Just make sure you’re using strong cipher suites, as appropriate to the protocol.

    If neither SSL/TLS or IPSec fits your scenario/environment, your next choice should be AES (aka Rijndael).
    Use keys at least 256 bits long, if you want you can go longer.
    Keys should be randomly generated, by a cryptographically secure random number generator (and not a simple rnd() call).
    Set the cipher mode to CBC.
    Use PKCS7 padding.
    Generate a unique, crypto-random Initialization Vector (IV). Don’t forget to properly protect and manage your keys, and maybe consider periodic key rotations.

    Depending on your data, you may want to also implement a keyed hash, to provide for message integrity – use SHA-256 for hashing.

    There are also rare situations where you may want to go with a stream cipher, but thats usually more complicated and I would recommend you avoid it your first time out.

    Now, I’m not familiar ezpycrypto (or really python in general), and cant really state that it supports all this; but everything here is pretty standard and recommended best practice, if your crypto library doesnt support it, I would suggest finding one that does ;-).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 65k
  • Answers 65k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer An abuse of the parsname function: create function INET_ATON (@addr… May 11, 2026 at 11:15 am
  • added an answer You may want to use before_create or another callback to… May 11, 2026 at 11:15 am
  • added an answer Use the s modifier: $template = preg_replace( $'/\{a\}([.\n]+)\{\/a\}/s', 'X', $template,… May 11, 2026 at 11:15 am

Related Questions

I haven't used C++ since college. Even though I've wanted to I haven't needed
I haven't touched sharepoint in years. If I want to setup a development environment
I haven't completely understood, how to use sigprocmask() . Particularly, how the set and
I haven't programmed games for about 10 years (My last experience was DJGPP +
I haven't seen any questions relating to GNU autoconf/automake builds, but I'm hoping at
I haven't done a lot of .NET programming, but I've examined a few of
I haven't kept up lately with the C++ world. Exactly where do things stand
I haven't used Visual Studio since VB 3 and am trying to give it
I haven't done work in C/C++ for a little bit and was just wondering
I haven't a clue about encryption at all. But I need it. How? Say

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.