Why does Diffie-Hellman need be a cyclic group?

A

arian

Why is Diffie-Hellman defined on a cyclic group? Doesn't it work for any commutative operation which the inverse is hard to find?

Say Alice and Bob agree in a public prime $c$ and both choose a secret prime $a$ respectively $b$

Alice sends $ac$ to Bob and Bob $bc$ to Alice.

Alice then multiplies $a$ with bobs message $bc$ yielding $abc$ Bob then multiplies $b$ with Aice's message $ac$ yield $bac$

which are the same due to commutativity and associativity. Hence they now share a common secret $abc$.

It is hard for Eve to factorize $ac$ and $bc$ into its original primes $a,b,c$ and Eve hasn't got enough information to construct $abc$ so why isn't this a valid Diffie-Hellman key-exchange?
 

Unreplied Threads

How to demodulate Binary Offset Carrier Signal?

I need to modulate and demodulate a BOC (Binary Offset Carrier) modulated signal.

I tried starting with:

Code:
data_bits_I = ... % Array of 1 and 0 values;       % Size = 100 000 x 1 double
modData_I = bocmod(dataBits_I, 10, 5, 2, "cos");  % Size = 100 000 x 1 double

The signal should be filtered with a raised cosine filter but I i try to use it, I get a wrong spectrum (differents from internet documents) and I get 800 000 samples instead of 100 000 as expected. When the raised cosine filter shoul be applied? Maybe never?

Then I multiply the signal with the carrier and add noise.

Code:
signalComp = CarrierAmpl_I * modData_I + 1i * CarrierAmpl_Q * modData_Q;
signalTx = signalComp .* carrier;
rxSignal = signalTx + gNoise;

basebandSignal = rxSignal .* conj(carrier);

Then I need to demodulate it to recover orignal transmitted bits. How this signals should be demodulated?

Thanks.

BPSK modulation with Eb/N0 computation

Good Morning to everyone.

My goal is to create a BPSK modulated signal starting from Eb/N0.

The signal is composed by I-Q components both modulated using BPSK and pulse shaped with squared-root raised cosine filter. I tried to modulate and demodulate the signal and then to compute Eb/N0 to obtain the starting values but there is somenthing wrong.

I start with Eb/N0 computation to find the Signal Power and the Noise Power. At the end of all computation, I should obtain the same initial values. BW is my bandwidth while Rb is my bitrate

Code:
EbN0 = 4;
CN = EbN0 + pow2db(Rb/BW);               % [dB]
NoiseMu = 0;
NoiseSigma = 20;     
NoiseTemp = (NoiseMu + NoiseSigma .* randn(SamplesNum, 1));
N = pow2db(rms(NoiseTemp)^2) + 3;          % +3dB = Multiply by 2 to have both I and Q components

I think there is a formula to compute sigma starting from Eb/N0 but i cannot find any working formula, so for now I compute the Noise Power N using a fixed sigma

Code:
C = CN + N;                                 % [dB]
CN0 = CN + pow2db(BW);                      % [dBHz]
% Carrier Power Share [dB]
CarrierPow_I = pow2db(db2pow(C) * PowShare_I_Perc); % 0.1 power share
CarrierPow_Q = pow2db(db2pow(C) * PowShare_Q_Perc); % 0.9 power share

% Carrier Amplitude [?]
CarrierAmpl_I = 2*sqrt(2*db2pow(CarrierPow_I));
CarrierAmpl_Q = 2*sqrt(2*db2pow(CarrierPow_Q));

I found that the formula to compute the Amplitude for a sinusoidal signal starting from its power is A = sqrt(2*Power_in_dB) but to obtain the same final power for a BPSK modulated signal I experienced that I have to multiply its amplitude by 2. Why? It's correct?

Code:
dataRandN_I = randn(SamplesNum, 1);
dataRandN_Q = randn(SamplesNum, 1);
gNoise = NoiseSigma * dataRandN_I + 1i * NoiseSigma * dataRandN_Q;

Then I start to modulate:

Code:
data_bits_I = ... % Array of 1 and 0 values;
data_bits_Q = ... % Array of 1 and 0 values;
RaisedCosine = rcosdesign(0.5, 4, 8, 'sqrt'); %Samples per bit = 8
modData_I = real(pskmod(dataBits_I, 2));
modData_Q = real(pskmod(dataBits_Q, 2));

pulsedShaped_I = upfirdn(modData_I, RaisedCosine, 8); %Samples per bit = 8
pulsedShaped_I = pulsedShaped_I(1:nBits*8);
pulsedShaped_Q = upfirdn(modData_Q, RaisedCosine, 8); %Samples per bit = 8
pulsedShaped_Q = pulsedShaped_Q(1:nBits*8);

signalComp = CarrierAmpl_I * pulsedShaped_I + 1i * CarrierAmpl_Q * pulsedShaped_Q;
signalTx = signalCompFilt .* carrier;  
signalTx_gNoise = signalTx + gNoise;

The I demodulate the signal and tried to obtain the same starting values.

Code:
basebandSignal = signalTx_gNoise .* conj(carrier);
rxFilterOut = upfirdn(basebandSignal, RaisedCosine, 1, 8);

dataOut_I = real(rxFilterOut) < 0;
dataOut_I = imag(rxFilterOut) < 0;

fDelay = 5; % Raised cosine filter span in symbols
[bitError_I, ber_I] = biterr(dataBits_I(1:nBits-fDelay), dataOut_I(fDelay+1:nBits));
[bitError_Q, ber_Q] = biterr(dataBits_Q(1:nBits-fDelay), dataOut_Q(fDelay+1:nBits));

noise_power = pow2db( rms(gNoise)^2 );
signal_power = pow2db( (rms(signalTx_gNoise ) )^2 );
% The signal inlcude noise too, so remove its power
signal_power = pow2db(db2pow(signal_power) - db2pow(noise_power));

SNR = signal_power - noise_power;
CN0 = SNR + 10*log10(BW);

Eb = signal_power - pow2db(Rb);       % dB
N0 = noise_power - pow2db(BW);
EbN0 = Eb - N0;

Or alternatively

Code:
EbN0 = SNR + 10*log10(BW/Rb);

Then I repeated these formula separating the components I as real(signal) and Q as imag(signal).

When I execute the code I get this:

Starting from Eb/N0 as 4 I compute all signals and noise power (using power share of 0.1 and 0.9) to be used in modulation:

Code:
Eb/N0 = 4.00, CN0 = 74.10 dBHz
Power Ampl = 7.84, Power Ampl I = 2.48, Power Ampl Q = 7.44
Signal Power = 8.85 dB, Signal Power I = -1.15 dB, Signal Power Q = 8.40 dB
Noise Power = 12.54 dB

After demodulation I get:

Code:
Error Bit I = 27678/100000, Error Bit Q = 11678/100000
BER_I = 2.767938e-01, BER_Q = 1.167858e-01
CN0 = 74.10 dBHz
SNR = -3.68 dB, SNR_I = -10.79 dB, SNR_Q = -1.11 dB
Signal Power = 8.88 dB, Signal Power I = -1.24 dB, Signal Power Q = 8.43 dB
Noise Power = 12.56 dB, Noise Power I = 9.56 dB, Noise Power Q = 9.55 dB
Eb = -61.22 dB
N0 = -65.22 dB/Hz
Eb/N0 = 3.999 dB, Eb/N0_I = -3.112 dB, Eb/N0_Q = 6.568 dB
Eb/N0 = 3.999 dB, Eb/N0_I = -3.112 dB, Eb/N0_Q = 6.568 dB

with a negative Eb/N0 on I components (I think it's wrong) and a BER/EbN0 values not compliant with theoretical curve.

What I'm missing? Thank you

CentOS8 で dnf update 実行後に再起動を行うと ssh 接続ができなくなった

GMOクラウドのVPSを使用していますが。

Code:
dnf update

を実行後に再起動を行いSSHでの接続を行おうとすると、

Code:
ssh: connect to host [ IP アドレス ] port [ Port番号 ]: Resource temporarily unavailable

となります。

アップデートを行った後になにかしなくてはならないのでしょうか?

<環境について>
・GMO Cloud VPS
・CentOS8

何か必要な情報などございましたら、お知らせくださいませ。

metropolis様より頂いた件が下記となります。
ssh -vvv host です
(再インストールをし「dnf update」をしていない状態です)

Code:
OpenSSH_8.0p1, OpenSSL 1.1.1c FIPS  28 May 2019
debug1: Reading configuration data /etc/ssh/ssh_config
debug3: /etc/ssh/ssh_config line 51: Including file /etc/ssh/ssh_config.d/05-redhat.conf depth 0
debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf
debug2: checking match for 'final all' host [ host ] originally [ host ]
debug3: /etc/ssh/ssh_config.d/05-redhat.conf line 3: not matched 'final'
debug2: match not found
debug3: /etc/ssh/ssh_config.d/05-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1 (parse only)
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug3: gss kex names ok: [gss-gex-sha1-,gss-group14-sha1-]
debug3: kex names ok: [curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1]
debug1: configuration requests final Match pass
debug2: resolve_canonicalize: hostname [ host ] is address
debug1: re-parsing configuration
debug1: Reading configuration data /etc/ssh/ssh_config
debug3: /etc/ssh/ssh_config line 51: Including file /etc/ssh/ssh_config.d/05-redhat.conf depth 0
debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf
debug2: checking match for 'final all' host [ host ] originally [ host ]
debug3: /etc/ssh/ssh_config.d/05-redhat.conf line 3: matched 'final'
debug2: match found
debug3: /etc/ssh/ssh_config.d/05-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug3: gss kex names ok: [gss-gex-sha1-,gss-group14-sha1-]
debug3: kex names ok: [curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1]
debug2: ssh_connect_direct
debug1: Connecting to [ host ] [[ host ]] port 22.
debug1: connect to address [ host ] port 22: Connection refused
ssh: connect to host [ host ] port 22: Connection refused

Mi fondo es afectado al agregar contenido

Agregue el fondo en un archivo css con la etiqueta body, quiero agregar una imágen del lado izquierdo y a la derecha agregar texto pero al momento de ajustar la anchura y el largo de la imagen el fondo se ve afectado al usar div, el código que agregue no se ve afectado, si existe algún otro método que me diga por favor

Code:
    <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Aboutme</title>
    <link rel="stylesheet" href="CSS/sobremi.css">
</head>
<body>
    <img src="img/4.jpg">
    <p>edqwldqw</p>
</body>
</html>

    body{
    background-image: url(/img/veremos.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
}

img{
    width: 600px;
    height: 860px;
}

Problema al verificar conexión de internet en Android

tengo implementado el siguiente código, que trabaja perfectamente, abajo del codigó les explico cual es el problema loco que tengo

----------------- MainActivity java ------------

Code:
public class MainActivity extends AppCompatActivity implements ConnectivityReceiver.ConnectivyReciverListener {

    

    @RequiresApi(api = Build.VERSION_CODES.KITKAT)
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_campeonatos);

        checkInternetConecction();

    }

    @RequiresApi(api = Build.VERSION_CODES.KITKAT)
    private void checkInternetConecction() {
        boolean isConnected = ConnectivityReceiver.isConnected();

        showSnackBar(isConnected);

        if (!isConnected){
            changeActivity();
        }


    }

    @RequiresApi(api = Build.VERSION_CODES.KITKAT)
    private void changeActivity() {

                Intent intent = new Intent(this, activity_offline.class);
                startActivity(intent);

    }

    private void showSnackBar(boolean isConnected) {
        String message;
        int color;

        if (!isConnected){
            message = "You Are Offline..!!";
            color = Color.WHITE;


        Snackbar snackbar = Snackbar.make(findViewById(R.id.RL), message, Snackbar.LENGTH_LONG);
        View view = snackbar.getView();
        TextView textView = view.findViewById(com.google.android.material.R.id.snackbar_text);
        textView.setTextColor(color);
        snackbar.show();
        }
    }

    
    @Override
    protected void onResume() {
        super.onResume();



                final IntentFilter intentFilter = new IntentFilter();
                intentFilter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);

                ConnectivityReceiver connectivityReceiver = new ConnectivityReceiver();
                registerReceiver(connectivityReceiver, intentFilter);

                MyApp.getInstance().setConnectivyListner(Campeonatos.this);


    }

    @RequiresApi(api = Build.VERSION_CODES.KITKAT)
    @Override
    public void onNetworkConnectionChanged(boolean isConnected) {

        if (!isConnected){
            changeActivity();
        }

        showSnackBar(isConnected);
    }


}

------------- ConectivityReceiver java ------------

Code:
public class ConnectivityReceiver extends BroadcastReceiver {

    public static ConnectivyReciverListener connectivyReciverListener;

    public ConnectivityReceiver() {
        super();
    }

    @RequiresApi(api = Build.VERSION_CODES.KITKAT)
    @Override
    public void onReceive(Context context, Intent intent) {
        ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);

        NetworkInfo activeNetwork = Objects.requireNonNull(cm).getActiveNetworkInfo();

        boolean isConnected = activeNetwork!=null && activeNetwork.isConnectedOrConnecting();

        if (connectivyReciverListener!=null) {
            connectivyReciverListener.onNetworkConnectionChanged(isConnected);
        }
    }

    @RequiresApi(api = Build.VERSION_CODES.KITKAT)
    public static boolean isConnected(){
        ConnectivityManager cm = (ConnectivityManager) MyApp
                .getInstance()
                .getApplicationContext()
                .getSystemService(Context.CONNECTIVITY_SERVICE);

        NetworkInfo activeNetwork = Objects.requireNonNull(cm).getActiveNetworkInfo();

        return activeNetwork!=null && activeNetwork.isConnectedOrConnecting();
    }

    public interface ConnectivyReciverListener {
        void onNetworkConnectionChanged (boolean isConnected);
    }
}

----------------------MyApp java ----------------------------

Code:
public class MyApp extends Application {
    private  static  MyApp mInstance;

    @Override
    public void onCreate() {
        super.onCreate();

        mInstance = this;
    }

    public static synchronized MyApp getInstance(){
        return mInstance;
    }

    public void setConnectivyListner(ConnectivityReceiver.ConnectivyReciverListener listner){
        ConnectivityReceiver.connectivyReciverListener = listner;
    }
}

Como verán uso esos 3 códigos, y trabaja perfectamente, si no hay wifi o Datos, te abre una nueva actividad indicándote que tienes problema con la Internet, hasta acá estamos bien, el problema que tengo, es que si la app esta en segundo plano, y estoy en Whatsapp por ejemplo o cualquier otra aplicación, o jugando y se va la Internet, automáticamente se dispara la actividad que indica que no hay Internet de mi aplicación y se pone la app en primer plano por encima del whatsapp o el juego, osea una locura jajaja, yo necesito que se realice esa verificación solo si el usuario tiene la aplicación abierta, si esta en segundo plano no deseo que realice ninguna verificación de la Internet, como puedo lograr ello. Espero se entienda el problema, de antemano gracias a todos por la ayuda.

Map SharePoint 2016 On-Prem Document Library as a Network Drive with PowerShell

I am trying to map a SharePoint 2016 on-prem document library as a shared drive.

I can map it manually but I am trying to do it with PowerShell

my document library url is http://mysharepointinstance/sitename/documentlibrary

Note: site is not SSL configured and code will execute on a Windows 10 box

Code:
$LibraryPath = "\\mysharepointinstance@SSL\DavwwwRoot\sitename\documentlibrary"
New-PSDrive -name "R" -Root $LibraryPath -PSProvider filesystem

but I am getting error

Code:
The specified drive root "\\mysharepointinstance@SSL\DavwwwRoot\sitename\documentlibrary" either does not exist, or it is not a folder.

$M^3$ admits $Sol$ geometry if and only if $\pi_1M$ is virtually solvable but not virtually nilpotent?

Let $M$ be a closed, orientable, irreducible 3-manifold and having an infinite fundamental group. Is it true that $M$ admits $Sol$ geometry if and only if $\pi_1M$ is virtually solvable but not virtually nilpotent?

Also, is there a reference for this question?
Top